HIk, Expert,
I run the script in cmd.exe direly, it runs well and get the product name and version and save to the assigned file.
I save the script as bat file and run it. I found the value missed. see below screenshot.
Please give advice what I lost?
