以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  完整创建桌面快捷方式  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=183178)

--  作者:811233895
--  发布时间:2022/10/27 12:51:00
--  完整创建桌面快捷方式
dim ShutName as string ="在这里输入快捷方式的名称.lnk"
For Each s As String In FileSys.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.Desktop))
    If s.Contains(ShutName) = True Then
return
    End If
Next

Dim FilePath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
Dim wsh As object = CreateObject("WScript.Shell")
Dim PathLink As String =FilePath &  "\\" & ShutName
Dim wshs As object = wsh.CreateShortcut(PathLink)
wshs.TargetPath = "当前运行路径" & "\\当前运行的文件名称.exe"
wshs.WorkingDirectory = 当前运行路径
wshs.Save()
wshs = Nothing
wsh = Nothing

--  作者:蓝才文百
--  发布时间:2022/12/14 13:00:00
--  
补充,增加自定义图标:

wshs.IconLocation = ApplicationPath & "\\foxtable.ico,0"

--  作者:9EQ98
--  发布时间:2023/8/3 16:01:00
--  
请问是否有修改快捷方式: 以管理者身份运行 的属性语句?
--  作者:有点蓝
--  发布时间:2023/8/3 16:17:00
--  
http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=184728&skin=0