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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help split scripts

Status
Not open for further replies.

funstur

Technical User
Feb 15, 2001
66
GB
I am attempting to run diffrent scripts in relation to the operating system. Using %OS% as a variable, win2000 & winnt have the same variable. I would like to use a command that will differentiate between the two, something like piping ver to a variable.

Can anybody help??????????????

only only the teaboy honest!!!
 
You might try looking for a file that only exists in one of the two operating systems. Don't know one off hand, but say there is a W2K.EXE in the winnt\system32 directory, you could you have a section "if exist c:\winnt\system32\w2k.exe goto w2k", then have a :w2k section of the script.

You could also set a specific variable on the W2K or NT machines to make the distinction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top