Archive: How to use InstallDirRegKey


How to use InstallDirRegKey
Hi,

I want to store the current installation folder into the registry so it can be reused by upgrades to change the default installation path to the one choosen by the user during a previous installation.

How can I use InstallDirRegKey to achive this ?

Many thanks


In a section use:


; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\[YOURSOFTWARENAME] "Install_Dir" "$INSTDIR"

Then use (outside functions/sections):

; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)

InstallDirRegKey HKLM SOFTWARE\[YOURSOFTWARENAME] "Install_Dir"


-Stu

Hi Stu,

Thanks, quite simple to use.

Romain