Dim WshShell As Object, MyShortcut As Object
Set WshShell = CreateObject("Wscript.shell")
Dim strDesktop As String
strDesktop = WshShell.SpecialFolders("Desktop")
Set MyShortcut = WshShell.CreateShortcut(strDesktop + "\我的快捷方式.lnk") '此处为快捷名称
MyShortcut.TargetPath = App.Path & "\" & App.EXEName & ".exe" '此处为源文件
'MyShortcut.IconLocation '此处为快捷图标,默认为应用程序的图标
MyShortcut.WorkingDirectory = App.Path '工作目录
MyShortcut.Description = "测试创建快捷方式" '备注
MyShortcut.Hotkey = "ALT+CTRL+A" '此处为快捷热键
MyShortcut.Save
posted on 2010-11-07 10:29
张志松 阅读(907)
评论(0) 编辑 收藏 引用