Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOS: set variable to program output?

Status
Not open for further replies.

jemminger

Programmer
Jun 25, 2001
3,453
US
hi all,

i'm just trying to set a variable to represent the output of the windows version from "ver":
Code:
set _ver = ver
echo _ver = %_ver%
this however results in just
Code:
_ver =

at the cmd prompt, my "ver" outputs "Microsoft Windows XP [Version 5.1.2600]"

what am i doing wrong?

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top