- @echo off
- Ver | find "5." >nul && goto Administrator
- >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
- if %errorlevel%==0 goto Administrator
- mshta vbscript:createobject("shell.application").shellexecute("%~s0","%1","","runas",1)(window.close)
- EXIT /B
- :Administrator
- ::判断世界之窗是否关闭
- tasklist | find /i "TheWorld.exe" >NUL && echo 请关闭世界之窗,按任意键继续备份 && pause > nul
- rem 干掉余下的世界之窗
- FOR /F "TOKENS=2" %%A IN ('TASKLIST ^| FIND /i "TheWorld.exe" 2>nul') DO (tskill %%A 1>nul 2>&1)
- echo 已经关闭世界之窗
- pause
复制代码
|