Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > How to identify if the OS is Vista or higher

Reply
Thread Tools Display Modes

How to identify if the OS is Vista or higher

 
 
DPM
Guest
Posts: n/a

 
      11-23-2007
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.


 
Reply With Quote
 
 
 
 
Peter Foldes
Guest
Posts: n/a

 
      11-23-2007
You can always run a simple script

--
Peter

Please Reply to Newsgroup for the benefit of others
Requests for assistance by email can not and will not be acknowledged.

"DPM" <> wrote in message news:...
> 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.
>
>

 
Reply With Quote
 
DPM
Guest
Posts: n/a

 
      11-23-2007
Thanks.
Any ideas on how I can do this ? Some sort of clue or example would help.
Do I need to create an exe using a programming language ?


"Peter Foldes" <> wrote in message
news:%23E$...
You can always run a simple script

--
Peter

Please Reply to Newsgroup for the benefit of others
Requests for assistance by email can not and will not be acknowledged.

"DPM" <> wrote in message
news:...
> 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.
>
>



 
Reply With Quote
 
Peter Foldes
Guest
Posts: n/a

 
      11-23-2007
DPM

Since this is a Vista newsgroup and putting a script within a post would not be appropriate for some frequenting this group, may I suggest that you repost this to the scripting newsgroup

news:\\msnews.microsoft.com\microsoft.public.windo ws.server.scripting


--
Peter

Please Reply to Newsgroup for the benefit of others
Requests for assistance by email can not and will not be acknowledged.

"DPM" <> wrote in message news:...
> Thanks.
> Any ideas on how I can do this ? Some sort of clue or example would help.
> Do I need to create an exe using a programming language ?
>
>
> "Peter Foldes" <> wrote in message
> news:%23E$...
> You can always run a simple script
>
> --
> Peter
>
> Please Reply to Newsgroup for the benefit of others
> Requests for assistance by email can not and will not be acknowledged.
>
> "DPM" <> wrote in message
> news:...
>> 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.
>>
>>

>
>

 
Reply With Quote
 
DPM
Guest
Posts: n/a

 
      11-23-2007
Thanks.


"Peter Foldes" <> wrote in message
news:%...
DPM

Since this is a Vista newsgroup and putting a script within a post would not
be appropriate for some frequenting this group, may I suggest that you
repost this to the scripting newsgroup

news:\\msnews.microsoft.com\microsoft.public.windo ws.server.scripting


--
Peter

Please Reply to Newsgroup for the benefit of others
Requests for assistance by email can not and will not be acknowledged.

"DPM" <> wrote in message
news:...
> Thanks.
> Any ideas on how I can do this ? Some sort of clue or example would help.
> Do I need to create an exe using a programming language ?
>
>
> "Peter Foldes" <> wrote in message
> news:%23E$...
> You can always run a simple script
>
> --
> Peter
>
> Please Reply to Newsgroup for the benefit of others
> Requests for assistance by email can not and will not be acknowledged.
>
> "DPM" <> wrote in message
> news:...
>> 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.
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista Sound Can't Identify Boris Windows Vista Installation 5 11-13-2007 02:39 PM
How to identify bit version of Windows Vista Ron Windows Vista General Discussion 5 10-30-2007 10:33 PM
Cannot identify network after Vista Upgrade MS: Brian Yee Windows Vista Networking 1 04-25-2007 10:05 AM
Vista does not identify Secondary monitor eveneden Windows Vista Hardware 4 04-06-2007 02:54 PM
A higher resolution? Wide Eyed Nerd Windows Vista Hardware 3 12-20-2006 12:47 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59