From 62b5ca2dbaa3ac08f8eed8552acf6f471be8dcba Mon Sep 17 00:00:00 2001 From: anders_k Date: Mon, 15 Feb 2021 13:52:06 +0000 Subject: [PATCH] Added QuietUninstallString git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7260 212acab6-be3b-0410-9dea-997c60f758d6 --- Docs/src/usefulinfos.but | 2 ++ Examples/install-per-user.nsi | 1 + Examples/install-shared.nsi | 1 + Examples/makensis.nsi | 6 +++--- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Docs/src/usefulinfos.but b/Docs/src/usefulinfos.but index f2951cc6..26533f62 100644 --- a/Docs/src/usefulinfos.but +++ b/Docs/src/usefulinfos.but @@ -42,6 +42,8 @@ Example: Some of the following values will not be used by older Windows versions. +\e{QuietUninstallString} (string) - Quiet uninstall command (\cw{"$INSTDIR\\uninst.exe" /S}) + \e{InstallLocation} (string) - Installation directory ($INSTDIR) \\ \e{DisplayIcon} (string) - Path, filename and index of the icon that will be displayed next to your application name diff --git a/Examples/install-per-user.nsi b/Examples/install-per-user.nsi index 9dc07765..9c31340e 100644 --- a/Examples/install-per-user.nsi +++ b/Examples/install-per-user.nsi @@ -56,6 +56,7 @@ Section "Program files (Required)" WriteRegStr HKCU "${REGPATH_UNINSTSUBKEY}" "DisplayName" "${NAME}" WriteRegStr HKCU "${REGPATH_UNINSTSUBKEY}" "DisplayIcon" "$InstDir\MyApp.exe,0" WriteRegStr HKCU "${REGPATH_UNINSTSUBKEY}" "UninstallString" '"$InstDir\Uninst.exe"' + WriteRegStr HKCU "${REGPATH_UNINSTSUBKEY}" "QuietUninstallString" '"$InstDir\Uninst.exe" /S' WriteRegDWORD HKCU "${REGPATH_UNINSTSUBKEY}" "NoModify" 1 WriteRegDWORD HKCU "${REGPATH_UNINSTSUBKEY}" "NoRepair" 1 diff --git a/Examples/install-shared.nsi b/Examples/install-shared.nsi index 7b9f6226..8149010b 100644 --- a/Examples/install-shared.nsi +++ b/Examples/install-shared.nsi @@ -59,6 +59,7 @@ Section "Program files (Required)" WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "DisplayName" "${NAME}" WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "DisplayIcon" "$InstDir\MyApp.exe,0" WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "UninstallString" '"$InstDir\Uninst.exe"' + WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "QuietUninstallString" '"$InstDir\Uninst.exe" /S' WriteRegDWORD HKLM "${REGPATH_UNINSTSUBKEY}" "NoModify" 1 WriteRegDWORD HKLM "${REGPATH_UNINSTSUBKEY}" "NoRepair" 1 diff --git a/Examples/makensis.nsi b/Examples/makensis.nsi index 7396268e..a8d7daed 100644 --- a/Examples/makensis.nsi +++ b/Examples/makensis.nsi @@ -836,9 +836,9 @@ Section -post WriteRegDword HKLM "Software\NSIS" "VersionBuild" "${VER_BUILD}" !endif - WriteRegExpandStr HKLM "${REG_UNINST_KEY}" "UninstallString" '"$INSTDIR\uninst-nsis.exe"' - ;WriteRegStr HKLM "${REG_UNINST_KEY}" "QuietUninstallString" '"$INSTDIR\uninst-nsis.exe" /S' ; Ideally WACK would use this - WriteRegExpandStr HKLM "${REG_UNINST_KEY}" "InstallLocation" "$INSTDIR" + WriteRegStr HKLM "${REG_UNINST_KEY}" "UninstallString" '"$INSTDIR\uninst-nsis.exe"' + WriteRegStr HKLM "${REG_UNINST_KEY}" "QuietUninstallString" '"$INSTDIR\uninst-nsis.exe" /S' + WriteRegStr HKLM "${REG_UNINST_KEY}" "InstallLocation" "$INSTDIR" WriteRegStr HKLM "${REG_UNINST_KEY}" "DisplayName" "Nullsoft Install System${NAMESUFFIX}" WriteRegStr HKLM "${REG_UNINST_KEY}" "DisplayIcon" "$INSTDIR\uninst-nsis.exe,0" WriteRegStr HKLM "${REG_UNINST_KEY}" "DisplayVersion" "${VERSION}"