I can specify installation directory and registry value in NSIS like this:
InstallDir "$PROGRAMFILES\CTVI"
InstallDirRegKey HKLM "Software\CTVI" "Install_Dir"
Now I can access InstallDir by using the notation $INSTDIR throughout the script. How do I similarly access InstallDirRegKey? Is there a similar notation as there exists for InstallDir? I tried $INSTDIRREGKEY but that is not. Now what I do is that I type HKLM "Software\CTVI" "Install_Dir" everytime I require it. But that is not so DRY 🙂
How to access InstallDirRegKey in NSIS
4 posts
I got an answer here http://stackoverflow.com/questions/1...regkey-in-nsis
NSIS will first try to get a previously set installation directory from registry. If it exists, $INSTDIR will be set to the value from registry. If it doesn't exist, $INSTDIR will be set to the default you set with the InstallDir directive.
Yes I understood that from the link I posted. Thanks..