本帖最后由 ygqiang 于 2017-9-27 09:18 编辑
- del /q ""%userprofile%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\显示桌面.lnk"
-
- set "back_d=C:\WINDOWS\system32"
- set "back_dir=C:\WINDOWS\system32\显示桌面.vbs"
- ::指定图标路径
-
- set "back_ico=%windir%\system32\shell32.dll,34"
- del /q "%userprofile%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\显示桌面.lnk"
-
- ;创建文件的快捷方式(普通位置)
- (echo Set objShell=CreateObject^("WScript.Shell"^)
- echo Set objlink=objShell.CreateShortcut^("%userprofile%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\显示桌面.lnk"^)
- echo objlink.Hotkey="CTRL+ALT+X"
- echo objlink.WindowStyle=3
- echo objlink.TargetPath="%back_dir%"
- echo objlink.WorkingDirectory="%back_d%"
- ::设置图标
- echo objlink.IconLocation="%back_ico%"
- echo objlink.Save
- )>"mysendto.vbs"
- start /wait "" "mysendto.vbs"
- del "mysendto.vbs"
-
- exit
复制代码 显示桌面.vbs代码为:- Dim objSHA
- Set objSHA = CreateObject("Shell.Application")
- objSHA.ToggleDesktop
- Set objSHA = Nothing
复制代码
|