Skip to content
⌘ NSIS Forum Archive

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

6 posts

zepitou#

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#
You can use ' or ` as quotes as well:

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

-Stu
Brummelchen#
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$\""
Afrow UK#
Brummelchen, I was using ` and ' for the NSIS code.
Notice the ' are outside and the " are inside:
'"$INSTDIR\ModInstaller.exe" "%1"'

-Stu