Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-10-05
6
Medium Priority
?
557 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 
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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Make the most of your online learning experience.
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

670 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