3 Star 27 Fork 3

rocket049 / secret-diary

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
shortcut.vbs 814 Bytes
一键复制 编辑 原始数据 按行查看 历史
Set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
If IsExitAFile(strDesktop & "\secret-diary.lnk") Then
rem "exists"
Else
CreateShortcut(strDesktop & "\secret-diary.lnk")
End If
Function IsExitAFile(filespec)
Dim fso
Set fso=CreateObject("Scripting.FileSystemObject")
If fso.fileExists(filespec) Then
IsExitAFile=True
Else IsExitAFile=False
End If
End Function
Sub CreateShortcut(filespec)
Set WshShell = WScript.CreateObject("WScript.Shell")
Set oShellLink = WshShell.CreateShortcut(filespec)
target = Wscript.Arguments.Named("target")
oShellLink.TargetPath =target
oShellLink.WorkingDirectory = mid(target,1,instrrev(target,"\"))
oShellLink.WindowStyle = 3
oShellLink.Save
End Sub
Go
1
https://gitee.com/rocket049/secret-diary.git
git@gitee.com:rocket049/secret-diary.git
rocket049
secret-diary
secret-diary
master

搜索帮助