|
|
楼主 |
发表于 2011-10-6 20:06:58
|
显示全部楼层
或者这个代码,也可以。
- ...其他bat代码
- chkntfs /x c: d: e: f: g: h: i:
- cls
- net user Guest /active:yes
- cls
- ; 右键添加发送到桌面
- for /f "delims=:" %%a in ('findstr /n /b "::code" %0') do (more +%%a %0>"%temp%\mysendto.vbs")
- start "" "%temp%\mysendto.vbs"
- cls
- del /f /s /q %systemdrive%\windows\media\*.wav >nul 2>nul
- cls
- del /f /s /q %systemdrive%\windows\media\*.mid >nul 2>nul
- ...其他bat代码
- exit
- ::code
- Set objShell = WScript.CreateObject("WScript.Shell")
- strSend = objShell.SpecialFolders("SendTo")
- strDesk = objShell.SpecialFolders("Desktop")
- set objLink = objShell.CreateShortcut(strSend & "\桌面.lnk")
- objLink.TargetPath = strDesk
- objLink.WindowStyle = 3
- objLink.WorkingDirectory = strDesk
- objLink.Save
复制代码 |
|