Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-10-05
6
Medium Priority
?
562 Views
Last Modified: 2012-05-05
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,
0
Comment
Question by:jamesspo
6 Comments
 

Author Comment

by:jamesspo
ID: 12230017
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 ?
0
 
LVL 2

Assisted Solution

by:etracsupport
etracsupport earned 150 total points
ID: 12230732
try to replace os with version

post your script, part of it lol
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Accepted Solution

by:
ampcats earned 150 total points
ID: 12232356
I use the VER script similar to above, and to detect a server,

IF exist  %windir%\system32\dsa.msc SET ISSERVER=TRUE

then branching your 2000 script with

IF "%ISSERVER%"=="TRUE" ( do server thing ) ELSE (do non server thing)

dsa.msc is a server only file - you can choose from many, but some are only installed with specific options - dsa is one that is always (AFAIK) installed

A.
 
0
 

Author Comment

by:jamesspo
ID: 12236231
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
0
 

Expert Comment

by:IT-Subscriptions
ID: 21875564
dsa.msc is NOT in w2k8 server
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
How to fix a SonicWall Gateway Anti-Virus firewall blocking automatic updates to apps like Windows, Adobe, Symantec, etc.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question