Reference/$INSTDIR: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(create page from http://nsis.sourceforge.net/Docs/Chapter4.html with wiki links)
 
(No difference)

Latest revision as of 10:40, 12 May 2017

$INSTDIR
The installation directory ($INSTDIR is 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, $INSTDIR contains 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, $INSTDIR will be $WINDIR in the uninstaller. If you write the uninstaller to another location, you should keep the installer's $INSTDIR in the registry or an alternative storing facility and read it in the uninstaller.