回复 1# hzusb -
- echo Sub startpin(lnkfile)>>0000-win7.vbs
- echo 'Const CSIDL_COMMON_PROGRAMS = ^&H17>>0000-win7.vbs
- echo Set objShell = CreateObject("Shell.Application")>>0000-win7.vbs
- echo 'Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)>>0000-win7.vbs
- echo 'strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path>>0000-win7.vbs
- echo path=Left(lnkfile,InStrRev(lnkfile,"\"))>>0000-win7.vbs
- echo Set objFolder = objShell.Namespace(path)>>0000-win7.vbs
- echo name=Replace(lnkfile,path,"")>>0000-win7.vbs
- echo Set objFolderItem = objFolder.ParseName(name)>>0000-win7.vbs
- echo Set colVerbs = objFolderItem.Verbs>>0000-win7.vbs
- echo For Each objVerb in colVerbs>>0000-win7.vbs
- echo If Left(objVerb.name,2) = "附到" Then objVerb.DoIt>>0000-win7.vbs
- echo Next>>0000-win7.vbs
- echo End Sub>>0000-win7.vbs
- echo startpin Wscript.Arguments(0)>>0000-win7.vbs
-
- ping 127.0.0.1 -n 3 >nul 2>nul
-
- 0000-win7.vbs "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\accessories\画图.lnk"
- 0000-win7.vbs "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\accessories\计算器.lnk"
- 0000-win7.vbs "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\资源监视器.lnk"
- 0000-win7.vbs "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\截图.lnk"
-
- 0000-win7.vbs "%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\记事本.lnk"
- 0000-win7.vbs "%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\命令提示符.lnk"
-
- 0000-win7.vbs "%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Internet Explorer.lnk"
-
- ping 127.0.0.1 -n 5 >nul 2>nul
-
- del /q 0000-win7.vbs
- exit
复制代码
|