Solved

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

Posted on 2004-10-05
6
531 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
 
LVL 2

Expert Comment

by:etracsupport
ID: 12227907
0
 

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 50 total points
ID: 12230732
try to replace os with version

post your script, part of it lol
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 6

Accepted Solution

by:
ampcats earned 50 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

I was recently sitting at a desk at work with one of my colleagues and needed some information on my home computer. He watched as I turned on my home computer, established a remote session into it, got the information I needed and then shut it down …
Article by: IanTh
Hi Guys After a whole weekend getting wake on lan over the internet working, I thought I would share the experience. Your firewall has to have a port forward for port 9 udp to your local broadcast x.x.x.255 but if that doesnt work, do it to a …
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now