I am running the following command to get Tomcat location from the Registry.
for /f "tokens=2 delims=REG_SZ" %t in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\5.5" /v InstallPath | find "REG_SZ"') do set drive=%t
The output is set drive= C:\Tomcat 5.5
It looks like the the chars between = and C:\ are not spaces, since my command to substitute spaces for nothing: set drive=%drive: =% does not work.
Any suggestions?
It is a tab. Replacing works only in a batch file.