【问题标题】:Adding files for installer为安装程序添加文件
【发布时间】:2013-01-25 06:46:08
【问题描述】:

我可以添加.JPEG, .PNG, .SDF, .MDF 等。但是为什么我不能为我的安装项目添加.Ink 扩展?

【问题讨论】:

  • 您希望此快捷方式重定向到哪个文件夹?
  • 我想要.Ink 扩展名,在任何文件夹中。
  • 是的,但指向什么文件夹?
  • 因为如果您右键单击目标文件夹之一,您可以Create New Shortcut
  • 是的,对,我的意思是,我想在我的安装程序中添加现有文件(.Ink 扩展名)不是来为我的安装程序创建一个.Ink 扩展名. :)

标签: c# vb.net visual-studio-2010 visual-studio installation


【解决方案1】:

.Ink 是快捷方式,我想这就是为什么你不能添加它的原因,我想你想在桌面上创建一个快捷方式,你可以试试这个

Imports IWshRuntimeLibrary

 Dim WshShell As WshShellClass = New WshShellClass
        Dim MyShortcut As IWshRuntimeLibrary.IWshShortcut
        ' The shortcut will be created on the desktop
        Dim DesktopFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)
        MyShortcut = CType(WshShell.CreateShortcut(DesktopFolder & "\MyShortcutName.lnk"), IWshRuntimeLibrary.IWshShortcut)
        MyShortcut.TargetPath = Application.StartupPath & "\YourApp.exe" 'Specify target app full path
        MyShortcut.Save()
End Sub

【讨论】:

    猜你喜欢
    • 2017-10-06
    • 2019-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-20
    • 2020-03-31
    • 1970-01-01
    相关资源
    最近更新 更多