为安装程序添加文件

时间:2013-01-25 06:46:08

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

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

1 个答案:

答案 0 :(得分: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
相关问题