
怎樣以管理員身份隱藏運(yùn)行BAT最后由 smss 于 -5-23 18:29http://www.bathome.net/thread-49098-1-2.html
以管理員身份運(yùn)行 由注冊(cè)表項(xiàng):HKEY_CLASSES_ROOTbatfileshellrunascommand 控制,其默認(rèn)值為:%SystemRoot%System32cmd.exe /C %1 %* 能不能在注冊(cè)表中就把這個(gè)和HIDECMD合并為一句呢@WHY@Batcher管理員應(yīng)該知道 在腳本頭加以下代碼 也是一知半解 用VBS隱藏會(huì)有黑窗一閃而過 最后用的HIDECMD來隱藏 大師們都是怎樣處理這個(gè)問題呢%2 mshta vbscript:CreateObject(Shell.Application).ShellExecute(cmd.exe,/c %~s0 ::,,runas,1)(window.close)&&exitnclick="copycode($('code0'));">復(fù)制代碼
- for %%i in (Wim esd ISO)do ((if Wim==%%i set i=53)&(if %%i==ESD set i=57)&(if %%i==ISO set i=88)
- reg add HKLMSOFTWAREClassesDirectoryshell給朕打包為%%i /v icon /t REG_SZ /d SHELL32.dll,1!i! /f
- reg add HKCRDirectoryshell給朕打包為%%iCommand /f /ve /t REG_SZ /d %~dp0HIDECMD.exe %~dp0執(zhí)行.bat %%1 %%i
- if not ISO==%%i (reg add HKCRSystemFileAssociations.%%iShell給朕解開... /v icon /t REG_SZ /d SHELL32.dll,1!i! /f
- reg add HKCRSystemFileAssociations.%%iShell給朕解開...Command /f /ve /t REG_SZ /d %~dp0HIDECMD.exe %~dp0執(zhí)行.bat %%1 WimEsd
- )
- )

