I am sorry to bother you with this but I cannot find the solution to this so I hope someone might have an idea or even a solution to this problem.
I am trying to query a string from the registry and put the result in a variable from inside a batch file.
The information I want to retrieve out of the registry is the installation path of ZoomPlayer.
It is stored like this in the registry:
CODE
[HKEY_CURRENT_USER\Software\VirtuaMedia\ZoomPlayer]
"InstallDirectory"="C:\\Programme\\Zoom Player"
"InstallDirectory"="C:\\Programme\\Zoom Player"
Now, I am querying the registry with this command:
CODE
FOR /F "TOKENS=3" %%i in ('reg query "HKCU\Software\VirtuaMedia\ZoomPlayer" /v InstallDirectory ^| FINDSTR "REG_SZ" ') do set INSTALLPATH = "%%i"
This works fine except for one small problem. It will always retrieve this result:
CODE
"C:\Programme\Zoom"
This means, it will stop at the first blank instead of retrieving the whole path. Of course this is useless !
I have tried all kinds of things to get around this but found no working solution. Any ideas ?
Thanks for your help !
Bye,
Alex