|
Well, looks like we jumped over one hurdle only to land on another. This is the script that I am writing for the Batch file portion of the login. Looks like the error level isn't working for some reason, even if I put it above another errorlevel detect. I also went with the other direction. If there is an error, assume the machine is factory and abort the script. Once again, you guy's help is much appreciated.
Chewmanfoo
REM Init variables set KixCopy= set AV= set RAS=
REM ------------------------------- REM Check for connection type REM ------------------------------- ipconfig | find /i "address" | find " 172." > nul if not "%errorlevel%" == "0" goto factory
%0\..\checkras >nul if errorlevel 1 set RAS=YES
REM ------------------------------- REM End Check for connection type REM -------------------------------
:oscheck REM ------------------------------- REM Check for OS type REM ------------------------------- rem @echo off REM Batch file to detect operating system REM ---------------------------------- echo "Checking for machine type..." echo. echo. echo. IF "%OS%" == "Windows_NT" goto WinNT goto WIN9x
:WIN9x echo You are NOT running Windows NT (Windows 95/98 perhaps?) goto kixcheck
:WINNT REM %0\..\gettype.exe gettype.exe if errorlevel=9 goto FILENOTFOUND
echo You are running... REM echo More Specifically: echo.
if ERRORLEVEL=8 goto EIGHT if ERRORLEVEL=7 goto SEVEN if ERRORLEVEL=6 goto SIX if ERRORLEVEL=5 goto FIVE if ERRORLEVEL=4 goto FOUR if ERRORLEVEL=3 goto THREE if ERRORLEVEL=2 goto TWO if ERRORLEVEL=1 goto ONE
:FILENOTFOUND echo. echo Gettype not found. echo. goto END
:EIGHT echo Windows NT [Enterprise/Terminal] Server Non-Domain Controller goto END
:SEVEN echo Windows NT [Enterprise/Terminal] Server Domain Controller goto END
:SIX echo Windows 2000 Server Domain Controller. goto END
:FIVE echo Windows NT Server Domain Controller. goto END
:FOUR echo Windows 2000 Server Non-Domain Controller. goto END
:THREE echo Windows NT Server Non-Domain Controller. goto END
:TWO echo Windows 2000 Professional installation. goto kixcheck
:ONE echo Windows NT Workstation. goto kixcheck
:KiXCheck sleep 1 REM ------------------------------------------ REM Check for local KiXtart files REM ------------------------------------------ echo. echo Checking for local KiXtart files.. echo. if exist %WINDIR%\kix32.exe goto ClientKiX echo No local files found. echo. if "%KiXCopy%" == "1" goto ServerKiX echo Attempting to copy files to echo client for faster execution.... echo. copy %0\..\kix32.exe %WINDIR% >nul copy %0\..\kx*.dll %WINDIR% >nul set KixCopy=1 goto KiXCheck REM ------------------------------------------ REM End Check for local KiXtart files REM ------------------------------------------
:ClientKiX REM ------------------------------------------ REM Begin Running KiXtart Script from client REM ------------------------------------------ echo. echo Running KiXtart from client... echo. %WINDIR%\kix32 %0\..\logon.kix REM ------------------------------------------ REM End Running KiXtart Script from client REM ------------------------------------------ goto End
:ServerKiX REM ------------------------------------------ REM Begin Running KiXtart Script from server REM ------------------------------------------ echo. echo Running KiXtart from server... echo. %0\..\kix32 logon.kix REM ------------------------------------------ REM End Running KiXtart Script from server REM ------------------------------------------ goto End
:factory echo "Welcome to the Factory" sleep 2 goto end
:End
|