Archive: How to add registry entries with multiple """""


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.


You can use ' or ` as quotes as well:

WriteRegStr HKLM
"Software\Classes\e4modFile\shell\open\command" "@" '"$INSTDIR\ModInstaller.exe" "%1"'

-Stu


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$\""

Many thanx for those quick and reliable answers!

Zp.


Brummelchen, I was using ` and ' for the NSIS code.
Notice the ' are outside and the " are inside:
'"$INSTDIR\ModInstaller.exe" "%1"'

-Stu


i saw it, but it was refused to work here...
the registry is different from exec strings