1

Hi Is there a way to determine windows os version in shell script ?

My requirement is

if OS_Version >= win_vista run cmd1 else run cmd2

1 Answer 1

2

The command to get the version is ver. Parse the version.txt file then do your compare.

C:\>ver >version.txt
C:\>type version.txt
Microsoft Windows [Version 6.1.7601]
Sign up to request clarification or add additional context in comments.

1 Comment

I want it in shell script...not in DOS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.