我之前也帮朋友的网吧写过一段类似的P。
应该不难理解,自己先看下吧,就不解释了。
RU.bat
@echo %dbg% off&setlocal enabledelayedexpansion
:: code by qasa copyright@qknet 1:31 2007-9-24
title 判断机号执行程序 作者:qasa
mode con cols=50 lines=10&color a
for /f "tokens=16 delims= " %%i in ('ipconfig /all^|find /i "Host Name"') do (
set set=%%i
set set=!set:~0,-1!
)
for /f "delims=" %%j in (SET.INI) do (
set se=%%j
if !se! equ !set! goto a
)
start "" df /install
exit /b
:a
for %%1 in (*.exe) do (
if %%1 neq df.exe start /wait "" %%1
)
goto :eof
SET.INI (输入机号)
-001
-002
-003
-004
NEWWORK
-006
-007
Last edited by qasa on 2007-12-12 at 10:06 PM ]