Archive: Whats the diffrence between...


Whats the diffrence between...
Whats the diffrence between:

InstallDirRegKey HKLM "Software\{PATH}" "Path"
and
WriteRegStr HKLM "Software\{PATH}" "Path" $INSTDIR

I know that second command saves chosen path, but what with the first option? Is it necessary?


from the manual

4.8.1.22 InstallDirRegKey

root_key subkey key_name

This attribute tells the installer to check a string in the registry, and use it for the install dir if that string is valid. If this attribute is present, it will override the InstallDir attribute if the registry key is valid, otherwise it will fall back to the InstallDir default. When querying the registry, this command will automatically remove any quotes. If the string ends in ".exe", it will automatically remove the filename component of the string (i.e. if the string is "C:\program files\poop\poop.exe", it will know to use "C:\program files\poop"). For more advanced install directory configuration, set $INSTDIR in .onInit.

4.9.2.16 WriteRegStr

root_key subkey key_name value

Write a string to the registry.


First command reads this key and overrides $INSTDIR with "Path" value.
Second command simply writes key to registry (I dont now the meaning of $INSTDIR in second command)


Thanks for help!!!