1
创建快捷方式我有这样的代码和它给的烦恼:在启动文件夹(VB.NET)
Imports IWshRuntimeLibrary
Imports Shell32
Public Sub CreateShortcutInStartUp(ByVal Descrip As String)
Dim WshShell As WshShell = New WshShell()
Dim ShortcutPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Startup)
Dim Shortcut As IWshShortcut = CType(WshShell.CreateShortcut(ShortcutPath &
Application.ProductName & ".lnk"), IWshShortcut)
Shortcut.TargetPath = Application.ExecutablePath
Shortcut.WorkingDirectory = Application.StartupPath
Shortcut.Descripcion = Descrip
Shortcut.Save()
End Sub
据我已阅读,你这是怎么创建启动快捷方式。但是,不管我称这个Sub多少,快捷方式都不显示。我已经在S.O和其他各种网站上看到很多类似的问题。
我甚至试图从其他应用程序创建快捷方式,仍然没有按预期显示。
我错过了什么?
什么Windows版本? – OneFineDay
@OneFineDay Windows 7家庭普通版 – soulblazer