Dears,
內容如下,原理為在c:\ip.txt新增一個文件檔,內容所放為ip位址
@ECHO off
REM ***************************************************************
REM Login Script
REM Install SmartIT Agent by IP
REM
:: IP checks ::::::::::::
ipconfig | find /i "IP" > c:\ip.txt
for /F "skip=1 tokens=2 delims=:" %%a in (c:\ip.txt) do set ip=%%a
for %%a in (10.1. 10.2. 10.3.12 ) do (
echo %ip% | find /i "%%a" > nul
IF NOT ERRORLEVEL 1 goto %%a
)
goto end
REM ==網段10.1=====================================
:10.1.
:10.3.
SET FILE_SERVER=smartit&goto install
REM ==網段10.2=====================================
:10.2.
:10.3.12
SET FILE_SERVER=127.0.0.1&goto install1
goto end
:: smartit install ::::::::::::
:install
\\%FILE_SERVER%\install\install.bat
:: smartit install ::::::::::::
:install1
\\%FILE_SERVER%\install\install1.bat
goto end
0 意見:
張貼留言