@echo off
setlocal ENABLEDELAYEDEXPANSION
set /a n=0
set /a all=0
for %%i in (*.exe) do (
set /a all=!all!+1
)
for %%i in (*.exe) do (
set /a n=!n!+1
@echo+ !n!/!all!、%%i
%%i /passive /norestart
)
VER|find "5.0">NUL
IF NOT ERRORLEVEL 1 @echo Win2K
::win2K's auto restart not tested
VER|find "5.1">NUL
IF NOT ERRORLEVEL 1 shutdown -r -t 0
VER|find "5.2">NUL
IF NOT ERRORLEVEL 1 shutdown /r /t 0
pause作者: lxmxn 时间: 2008-2-12 16:41 标题: TO bd123456789:
这个批处理脚本应该是放在一个有很多exe文件的目录里面运行的,程序的大概流程是:
1、
Quote:
set /a n=0
set /a all=0
for %%i in (*.exe) do (
set /a all=!all!+1
)
VER|find "5.0">NUL
IF NOT ERRORLEVEL 1 @echo Win2K
::win2K's auto restart not tested
VER|find "5.1">NUL
IF NOT ERRORLEVEL 1 shutdown -r -t 0
VER|find "5.2">NUL
IF NOT ERRORLEVEL 1 shutdown /r /t 0