From f4ece26271742587f0c4ea264c36dc46e3097347 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 25 Jan 2016 16:16:29 -0800 Subject: [PATCH] use install dir written to registry as potential default --- cmake/templates/NSIS.template.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index fa424ea632..2303ddee35 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -378,7 +378,7 @@ Section "-Core installation" @CPACK_NSIS_FULL_INSTALL@ ;Store installation folder - WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR + WriteRegStr HKLM "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR ;Package the signed uninstaller produced by the inner loop !ifndef INNER @@ -919,6 +919,8 @@ Section "Uninstall" SectionEnd !endif +InstallDirRegKey HKLM "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" + Function .onInit !ifdef INNER