Link to home
Start Free TrialLog in
Avatar of jamesspo
jamesspo

asked on

Win2k PDC - Logon script to identify Win2k Server, Win2k Pro and WinXP machines

Hi, I need to write a short logon script for a Win2k Domain to allow the following:

If OS = Win2k Server then
execute action 1
if OS = Win2k Pro then
execute action 2
if OS = WinXP then
execute action 3

How do I identify W2k SERVER, PRO and XP using a logon script ? %OS% does not seem to identy flavours of OS...

Many thanks,
Avatar of etracsupport
etracsupport

Avatar of jamesspo

ASKER

Hi, this works well for win2k PCs but not for XP. Whist I can use "errorlevel 9" for XP, it does not give a definitive answer for XP PCs. Could you help me understand how I can use VER in a batch file to reliably identify XP PC's with this script ?
SOLUTION
Avatar of etracsupport
etracsupport

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi. Thank you both very much. I've ended up using a hybrid of both. The absolute detection of XP is not 100% certain, unless I use both methods. There are no Win95/98/ME PCs on the network, so a failure of gettype to detect XP is OK, and I use the %ISSERVER% test to make sure that all machines that end up in the gettype errorleve 9 are not servers.

Hope you are happy with a point spilt.

Best regards,

James
dsa.msc is NOT in w2k8 server