Reference/$INSTDIR
From NSIS Wiki
Jump to navigationJump to search
- $INSTDIR
- The installation directory (
$INSTDIRis modifiable using StrCpy, ReadRegStr, ReadINIStr, etc. - This could be used, for example, in the .onInit function to do a more advanced detection of install location). - Note that in uninstaller code,
$INSTDIRcontains the directory where the uninstaller lies. It does not necessarily contain the same value it contained in the installer. For example, if you write the uninstaller to $WINDIR and the user doesn't move it,$INSTDIRwill be$WINDIRin the uninstaller. If you write the uninstaller to another location, you should keep the installer's$INSTDIRin the registry or an alternative storing facility and read it in the uninstaller.