• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 425
  • Last Modified:

Put the Windows OS Name into a DOS environment variable from the command line.

I want to put Put the Windows "OS Name" into a DOS environment veriable from the command line (in a batch file).
Peter
0
PeterSinger
Asked:
PeterSinger
1 Solution
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
First, you know there is a basic version variable in %os%, right?

Second, you can use a command like this:
for /f "tokens=* delims=" %%a in ('ver') do @set osversion=%%a

The above command will assign the output of the command ver to the varible %osversion%

If this is not what you are looking for, please try to be more specific.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now