Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OS check in a BAT
Message
Information générale
Forum:
Windows
Catégorie:
Configuration
Divers
Thread ID:
00875636
Message ID:
00875664
Vues:
21
The problem is that NT, 2K, and XP all have the same value for %OS%:
Try the below .bat file:
set ostype=DOS
IF %OS%==Windows_NT SET ostype=WinNT
set
You might try here:

http://www.robvanderwoude.com/index.html

Cool examples anyway...


>I know I should know this, but I've long forgotten. I have a new temporary BAT that checks for NT or XP OS to do installs via SMS. How does the DOS OS check code work? Something like this, in pseudocode:
>
>If OS = NT install this
>
>If OS = XP install that
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform