D
DPM
Hi,
Is there a way to know if the OS version is Vista or higher through a MS-DOS
batch
file ?
Following is a sample which I managed to do
Ver > OSVer.Txt
FIND "[Version 6." OSVer.Txt > NUL
IF ERRORLEVEL 1 ECHO OS is not Vista
IF NOT ERRORLEVEL 1 ECHO OS is Vista
The problems which I have regarding the above are,
- How to get the output from the VER command to a variable ? or is there any
other command ?
- Say if I send the output from VER to a text file how to know whether the
OS is Vista and above ?
(FIND only searches for a perticular text)
Please advise.
Is there a way to know if the OS version is Vista or higher through a MS-DOS
batch
file ?
Following is a sample which I managed to do
Ver > OSVer.Txt
FIND "[Version 6." OSVer.Txt > NUL
IF ERRORLEVEL 1 ECHO OS is not Vista
IF NOT ERRORLEVEL 1 ECHO OS is Vista
The problems which I have regarding the above are,
- How to get the output from the VER command to a variable ? or is there any
other command ?
- Say if I send the output from VER to a text file how to know whether the
OS is Vista and above ?
(FIND only searches for a perticular text)
Please advise.