|Is there a way to capture the actual error message the REG.exe puts out?|
Here's what I've got.
Reg query \\%compname%\HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0 | find "x86 Family" /I
IF %ERRORLEVEL%==0 echo %compname% is running a 32bit Operating System >>%outfile%
IF %ERRORLEVEL%==1 echo %compname% is running a 64bit Operating System >>%outfile%
I am trying to determine the OS type based on reg key. It works fine until I hit an instance where the key does not exist, ie the machine can not be reached.
I always get ERRORLEVEL=1. and REG sends this message to the screen "Error: The network path was not found."