|
Running Kixtart Version 3.60. Trying to determine OS version so that my login script won't run on Servers.
The version of Kix that we are using only has a function for determining if the OS is winnt or not, which doesn't work because xp and 2000 ws are winnt. It looks like this issue was addressed in later versions of Kix, but I am knee deep in the issue with 3.60 now.
Anyway, I think the solution is to run a batch file and return the variable back to script. The batch file that I have prepared is as follows:
**** @echo off REM Batch file to detect OS REM ---------------------------------- if Windows_NT == %OS% goto WINNT echo old goto END
:WINNT gettype.exe
if errorlevel=9 goto FILENOTFOUND
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 Server goto END
:SEVEN echo Server goto END
:SIX echo Server goto END
:FIVE echo Server goto END
:FOUR echo Server goto END
:THREE echo Server goto END
:TWO echo Workstation goto END
:ONE echo Workstation goto END
:END pause *******
Now what I am looking for is for: 1. How to call the batch file from Kix; 2. How to get the variable of workstation, server or old back into Kix; 3. Then I believe that if I have it back in I can just do an if statement with a goto?
Thanks for any help on this.
|