Little Willis is here. I am trying to use a batch script package to edit an existing registry key that is used when double-clicking the .jar file. The problem is that the data I'm trying to enter contains quotes, but I also need quotes to make it count as a string.
Example:
reg add "HKEY_LOCAL_MACHINE\Software\Classes\jarfile\shell\open\command" /v "" /t REG_EXPAND_SZ /d "C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %* /f
When I run this in a script package, the cmd window displays "Error: too many command line options"
So, to make it simple. I want to add a registry key with "C: \ Program Files \ Java \ jre7 \ bin \ javaw.exe" -jar "% 1"% * as data, including quotes, and% 1 and% * exactly as they are does not translate to any actual statement or string.
EDIT:
A registry is usually added using this command line:
ftype jarfile="C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*
it works fine on the command line, but just like the code below, when I used this in a script package, "% 1" and% * are not displayed.
source share