From 2115d8ce1c586fd88f544918dd1ba9c84ac4f8e5 Mon Sep 17 00:00:00 2001 From: kichik Date: Tue, 23 Nov 2004 20:10:40 +0000 Subject: [PATCH] added information about $INSTDIR not having the same value in installer and uninstaller git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3777 212acab6-be3b-0410-9dea-997c60f758d6 --- Docs/src/usection.but | 4 +++- Docs/src/var.but | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Docs/src/usection.but b/Docs/src/usection.but index 9f750148..795b14cb 100644 --- a/Docs/src/usection.but +++ b/Docs/src/usection.but @@ -9,4 +9,6 @@ A special Section named 'Uninstall' must be created in order to generate an unin \c DeleteRegKey HKLM SOFTWARE\myApp \c SectionEnd -The first \R{delete}{Delete} instruction works (deleting the uninstaller), because the uninstaller is transparently copied to the system temporary directory for the uninstall. \ No newline at end of file +The first \R{delete}{Delete} instruction works (deleting the uninstaller), because the uninstaller is transparently copied to the system temporary directory for the uninstall. + +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. diff --git a/Docs/src/var.but b/Docs/src/var.but index e08ba44a..90bfd2eb 100644 --- a/Docs/src/var.but +++ b/Docs/src/var.but @@ -24,6 +24,8 @@ Registers. These variables can be used just like user variables, but are usually The installation directory ($INSTDIR is modifiable using \R{StrCpy}{StrCpy}, \R{readregstr}{ReadRegStr}, \R{readinistr}{ReadINIStr}, etc. - This could be used, for example, in the \R{oninit}{.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. + \e{$OUTDIR} The current output directory (set implicitly via \R{setoutpath}{SetOutPath} or explicitly via \R{StrCpy}{StrCpy}, \R{readregstr}{ReadRegStr}, \R{readinistr}{ReadINIStr}, etc)