How do I call the kix script from different OS Versions?
This should hopefully addresses common batch file issues.
- We have Windows XP, and GETTYPE.EXE from the Windows 2000/Windows NT Resource Kit no longers works.
- How can we do this?
- Our batch script does not run, what could be the issue with it?
You will want to see this example provided by Microsoft.
A Logon Script Does Not Work If %0 or %0\..\ Calls Multiple Commands (Q318689)
So, taking MCA's original example, we can do the following:
code:
@ECHO off
SETLOCAL
VER | find "NT" > nul
IF not errorlevel 1 GOTO Win_NT
VER | find "2000" > nul
IF not errorlevel 1 GOTO Win_NT
VER | find "XP" > nul
IF not errorlevel 1 GOTO Win_NT
VER | find "98" > nul
IF not errorlevel 1 GOTO Win_9X
VER | find "95" > nul
IF not errorlevel 1 GOTO Win_9X
GOTO unknown_os
:win_NT
:: CHECK TO SEE IF THE Kixtart FILES ARE INSTALLED
IF NOT EXIST %SYSTEMDRIVE%\kix402.ok %LOGONSERVER%\NETLOGON\kix402update.exe /q
call kix32.exe %LOGONSERVER%\NETLOGON\your_script.kix
goto end
:win_9X
:: CHECK TO SEE IF THE Kixtart FILES ARE INSTALLED
IF NOT EXIST C:\kix402.ok %0\..\kix402update.exe /q
%0\..\kix.exe %0\..\your_script.kix
goto end
:unknown_os
:end
[ 07 July 2002, 19:52: Message edited by: kdyer ]