batFile是你的bat文件路径- @echo off
- %1 start "" mshta vbscript:createobject("shell.application").shellexecute("""%~0""","REM",,"runas",1)(window.close)&exit
- set "batFile=G:\Desktop\0.bat"
- for /f "delims=" %%i in ("%batFile%") do set "rightMenuName=Send To %%~nxi"
- reg add "HKCR\*\shell\%rightMenuName%\command" /ve /t REG_SZ /d "%batFile% \"%%1\"" /f
- pause&exit
复制代码
|