reg add invalid syntax cmd

1.3k Views Asked by At

I want to change a registry key on commandline, but it says always wrong syntax. Maybe someone can help me. Here is my code:

reg add HKLM\Software\Wow6432Node\Apache Software Foundation\Procrun 2.0\tomcat7\Parameters\Java /v Jvm /t REG_SZ /d C:\Program Files (x86)\Java\jre7_2\bin\client\jvm.dll /f

I want to change the java path. Do I need anything for the spaces in the path(s)?

Thanks very much!

1

There are 1 best solutions below

3
On BEST ANSWER

Try with

reg add "HKLM\Software\Wow6432Node\Apache Software Foundation\Procrun 2.0\tomcat7\Parameters\Java" /v Jvm /t REG_SZ /d "C:\Program Files (x86)\Java\jre7_2\bin\client\jvm.dll" /f

Values with spaces should be quoted to be handled as only one argument.