> You might want to ask the folks in one of the scripting groups or one of
> the script pros reading here might want to offer additional help.
>
> John
>
> BrianB wrote:
>
>> Cool. That gives me what I need to know. One last question. Any
>> suggestion how to get the information from VBS back to the cmd script?
>>
>> Brian
>>
>> "John John (MVP)" <audetweld[ at ]nbnet.nb.ca> wrote in message
>> news:O5cHmsMRJHA.4916[ at ]TK2MSFTNGP06.phx.gbl...
>>
>>>Use WMI and Win32_OperatingSystem class.
>>>
>>>
http://www.microsoft.com/technet/scriptcenter/topics/ccs/ccs_predeploy1.mspx>>>
>>>John
>>>
>>>BrianB wrote:
>>>
>>>>I'm modifying a cmd script and need to know which type of Windows it's
>>>>running and if it is 32 or 64 bit. I've found several sites suggesting
>>>>that the ver command works to find the OS, but the suggestions do not
>>>>cover all version of XP and Vista. By trial and error I have ...
>>>>
>>>>ver | find "2003" > nul
>>>>if %ERRORLEVEL% == 0 goto ver_2003
>>>>ver | find "Vista" > nul
>>>>if %ERRORLEVEL% == 0 goto ver_vista
>>>>ver | find "Microsoft Windows [Version 6.0" > nul
>>>>if %ERRORLEVEL% == 0 goto ver_xp
>>>>ver | find "XP" > nul
>>>>if %ERRORLEVEL% == 0 goto ver_xp
>>>>ver | find "Microsoft Windows [Version 5.2" > nul
>>>>if %ERRORLEVEL% == 0 goto ver_xp
>>>>ver | find "2000" > nul
>>>>if %ERRORLEVEL% == 0 goto ver_2000
>>>>ver | find "NT" > nul
>>>>if %ERRORLEVEL% == 0 goto ver_nt
>>>>echo Machine undetermined.
>>>>goto error
>>>>
>>>>But I cannot find any definitive list of what ver returns for each OS.
>>>>For 64-bit XP the ver output does not include the string "XP".
>>>>
>>>>I haven't a clue how to determine if its a 32-bit or 64-bit OS.
>>>>
>>>>Any suggestions?
>>>>Brian Bygland
>>>
>>