zepitou
9th June 2006 11:54 UTC
How to add registry entries with multiple """""
Hey,
For one application I'm packaging I have to re-create a Shell Extansion. So There is what I use to create registry entries :
WriteRegStr HKLM
"Software\Classes\e4modFile\DefaultIcon" "" ""$INSTDIR\ModInstaller.exe",1"
WriteRegStr HKLM
"Software\Classes\e4modFile\shell\open\command" "@" ""$INSTDIR\ModInstaller.exe" "%1""
Of course it doen't work as for NSIS I 'put' too many parameters (because of the numerous """ ). And of course if I remove any of those """, the Shell Extansion won't work...
So is there any simple way to make it work, or will I have to execute a .reg file and try to modify value of subkeys to put the right $INSTDIR?
Zp.
Afrow UK
9th June 2006 12:29 UTC
You can use ' or ` as quotes as well:
WriteRegStr HKLM
"Software\Classes\e4modFile\shell\open\command" "@" '"$INSTDIR\ModInstaller.exe" "%1"'
-Stu
Brummelchen
9th June 2006 14:08 UTC
windows dont accept ' as " and reg-modifications have no other way.
Use "$\"$\"" -> """"
example
WriteRegStr HKLM "Software\Classes\Applications\WinRAR.exe\shell\open\command" "" "$\"$INSTDIR\WinRAR.exe$\" $\"%1$\""
zepitou
9th June 2006 16:09 UTC
Many thanx for those quick and reliable answers!
Zp.
Afrow UK
9th June 2006 23:17 UTC
Brummelchen, I was using ` and ' for the NSIS code.
Notice the ' are outside and the " are inside:
'"$INSTDIR\ModInstaller.exe" "%1"'
-Stu
Brummelchen
10th June 2006 17:05 UTC
i saw it, but it was refused to work here...
the registry is different from exec strings