本帖最后由 ygqiang 于 2014-12-3 12:32 编辑
- ——————————————————————————————————————————————————
- ——————————————————————————————————————————————————
- del /q 0000-win7.vbs
-
- ::创建exe文件的lnk快捷方式
- ::win7系统下,在开始菜单的附件accessories下面,建立快捷方式
- @echo off
- set "SrcFile=%SystemRoot%\system32\shutdown.exe"
- set "Args=-s -t 2"
- set "LnkFile=关机.LNK"
- call :CreateShort "%SrcFile%" "%Args%" "%LnkFile%"
- pause & goto :eof
-
- ::Arguments 目标程序参数
- ::Description 快捷方式备注
- ::FullName 返回快捷方式完整路径
- ::Hotkey 快捷方式快捷键
- ::IconLocation 快捷方式图标,不设则使用默认图标
- ::TargetPath 目标
- ::WindowStyle 窗口启动状态
- ::WorkingDirectory 起始位置
-
- :CreateShort
- mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""startmenu"") & ""\\Programs\accessories\%~3""):b.TargetPath=""%~1"":b.WorkingDirectory=""%~dp1"":b.Arguments=""%~2"":b.Save:close")
-
-
- ;创建exe文件的lnk快捷方式
- ::win7系统下,在开始菜单的附件accessories下面,建立快捷方式
- set SrcFile=logoff
- set LnkFile=C:\ProgramData\Microsoft\Windows\Start Menu\Programs\accessories\注销
- call :CreateShort "%SrcFile%" "%LnkFile%"
- goto :eof
-
- ::Arguments 目标程序参数
- ::Description 快捷方式备注
- ::FullName 返回快捷方式完整路径
- ::Hotkey 快捷方式快捷键
- ::IconLocation 快捷方式图标,不设则使用默认图标
- ::TargetPath 目标
- ::WindowStyle 窗口启动状态
- ::WorkingDirectory 起始位置
-
- :CreateShort
- mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(""%~2.lnk""):b.TargetPath=""%~1"":b.WorkingDirectory=""%~dp1"":b.Save:close")
-
-
-
- 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\Paint.lnk"
- 0000-win7.vbs "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\accessories\Calculator.lnk"
-
- 0000-win7.vbs "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\Resource Monitor.lnk"
-
- 0000-win7.vbs "%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\关机.lnk"
-
- 0000-win7.vbs "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Snipping Tool.lnk"
-
-
- 0000-win7.vbs "%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Notepad.lnk"
- 0000-win7.vbs "%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Command Prompt.lnk"
-
- 0000-win7.vbs "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\accessories\注销.lnk"
-
- ping 127.0.0.1 -n 5 >nul 2>nul
-
- del /q 0000-win7.vbs
复制代码
|