版主的方式没有调通,那段语句确实可以实现显示的功能,可是无法集成到我的vbs的代码中,没有提示成,如果斑竹愿意,可否帮忙调通- Option Explicit
-
- Sub bat
- echo off & cls
- echo create_shortcut
- start wscript -e:vbs "%~f0"
- Exit Sub
- End Sub
-
-
- 'Dim objFSO,strFile,dp1
- 'set
- objFSO = CreateObject("Scripting.FileSystemObject")
- 'set
- strFile = objFSO.GetFile(WScript.ScriptFullName)
- 'set
- dp1= strFile.ParentFolder
-
-
- Set WshShell = WScript.CreateObject("WScript.Shell")
- strDesktop = WshShell.SpecialFolders("Desktop") :'特殊文件夹“桌面”
- Rem 在桌面创建一个快捷方式
- set oShellLink = WshShell.CreateShortcut(strDesktop & "\lingdong.lnk")
-
- Target = dp1 & "lingdong.exe"
- oShellLink.TargetPath =Target
- oShellLink.WindowStyle = 1
- oShellLink.Hotkey = "Ctrl+Alt+e"
- oShellLink.IconLocation = Target & ", 0"
- oShellLink.Description = "lingdong.exe的快捷方式"
- oShellLink.WorkingDirectory = dp1
- oShellLink.Save
复制代码
|