@echo off
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
start C:\Windows\System32\cmd.exe
window 压缩解压命令
单个:
对test.txt 压缩 解压 1.目标文件 2.生成文件
makecab ./test.txt ./test.zip
expand ./test.zip ./test.txt
文件夹:
对 /test/ 压缩 加压 【1.生成压缩文件,2.目标文件】【目标文件】
tar -cvzf zip.tar "./test"
tar -zxvf "./zip.tar"