Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Differentiate between workstion or server in script

Status
Not open for further replies.

inssain96

MIS
Dec 4, 2002
20
0
0
US
Does any one have a clever way of telling the difference between Workstation and Server 4.0 in a batch script?

In the past I've used:

ver |find "NT" >null
if not errorlevel 1 goto blah

this has worked great, until the recent M$ vulnerability that has both patches for Wks and Srv...

TIA

-Alex
 
you can use kixtart , it has some functions for that ,

or , much easier way is to see the OS variable at the set command ...

Alex,
MCP 2000
 
Unfortunately NT's OS variable is "Windows_NT" for both versions.

Kixtart would work, but for the few times a year we need to push a script it may not be worth it.

Instead...
I'm checking if the machine is NT, if it is then I'm having the machine run "gettype.exe" from the 2000 ResKit. It comes back with errorlevel 1-8 depending on OS, NT and 2000.

-Alex
 
you can also use the regini.exe from the r.k. to get this info from the registry ...

Alex,
MCP 2000
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top