Your default directory when you ran the oa3tool.exe was under the program files folders, and Windows will typically protect that whole tree from writing for normal users. You can either run the script in elevated admin mode, or probably better change the temp file location to a writable folder, like:
oa3tool.exe /validate > "%TEMP%\catch.txt"
SET /p $HexData=<"%TEMP%\catch.txt"
~bp
Bill Prew
Also, when you run the oa3tool.exe at a command prompt, what does it display? Can you paste up a sample of the output? And then specify exactly what value from the display you want placed in the variable?
~bp
Bill Prew
One more item, on the web page you referenced in your question, there already is a Powershell script that can extract the information from the output and convert it. Why not use that as is?
but but but- i need to provide the path of .exe file which is - C:\Program Files\windows kits\8.1\assessment and deployment kit\deployment tools\x86\licensing\oa30\
So after the path- i can write oa3tool.exe /validate and will get output, but then i wanted to convert the output into decimal form, for that i wanted to hold it in some variable say $HexData
Thanks
Bill Prew
That seems to be what the powershell script does on the page you originally referenced. That would be much harder, if not impossible in DOS BAT script, but probably could be done in a VBS script.
What are you planning to do with the value once you store it in a variable?
~bp
NVIT
Going the DOS route... this converts your variable $HexData to decimal 1000 and saves to $Dec:
because command prompt didnt run the way it is shown - so finally i directly posted to MSMQ-who is actually written the expert Exchange Article-so he replied-it make much sense, also there is alternate option of KeyFinder Plus tool, which is also helped
Open in new window