I am trying to run the following script
@ECHO OFF
FOR /F "Skip=1 Tokens=*" %%G IN ('WMIC COMPUTERSYSTEM GET Manufacturer') DO (SET "DeviceOEM=%%G")
ECHO OEM: %DeviceOEM%
PAUSE
However all I get is "ECHO OEM:", which indicates that %DeviceOEM% is blank.
Now if I run
FOR /F "Skip=1 Tokens=*" %%G IN ('WMIC COMPUTERSYSTEM GET Manufacturer') DO (ECHO %%G)
PAUSE
Then I get a real answer of my OEM.
I don't understand where this SET command is failing.