[Asm] 纯文本查看 复制代码 @echo off
mode con cols=100 lines=30
title 打印机重启服务v1.0
::###以管理员启动####
>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" )
pushd "%CD%"
CD /D "%~dp0"
net stop spooler
del c:\windows\system32\spool\printers\*.* /Q /F
net start spooler
pause >nul
exit
[Asm] 纯文本查看 复制代码 @echo off
title 显示你的IP
::###以管理员启动####
>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" )
pushd "%CD%"
CD /D "%~dp0"
color F9
ipconfig /all
@echo –
for /f "tokens=2 delims=:" %%i in ('ipconfig^|findstr "Address"') do set ip=%%i
@echo ==================[你的IP地址是:%ip%]===============
@echo –
ipconfig /all>本机ip地址.txt
Echo 请按任意键关闭窗口!信息已保存在【本机ip地址.txt】 &pause>NUL
for /f "tokens=2 delims=:" %i in ('ipconfig^|findstr "Address"') do echo |