summaryrefslogtreecommitdiff
path: root/Utilities
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2005-11-18 15:03:32 -0500
committerKen Martin <ken.martin@kitware.com>2005-11-18 15:03:32 -0500
commit1ecb0e02aff37056cfe8d36b6bd314ba08101923 (patch)
treea9365cdec0a0b07af6222742f1dbc62acb94ce6c /Utilities
parent47622dde016abb0ba27fac783e5b2038c91d23bb (diff)
downloadcmake-1ecb0e02aff37056cfe8d36b6bd314ba08101923.tar.gz
BUG: fixe dproblem with not uninstalling start menu entries
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/Release/CMake.nsi.in29
1 files changed, 28 insertions, 1 deletions
diff --git a/Utilities/Release/CMake.nsi.in b/Utilities/Release/CMake.nsi.in
index ad7a1f79a5..7c8663c06e 100644
--- a/Utilities/Release/CMake.nsi.in
+++ b/Utilities/Release/CMake.nsi.in
@@ -309,7 +309,6 @@ FunctionEnd
;Pages
!insertmacro MUI_PAGE_DIRECTORY
- !insertmacro MUI_PAGE_INSTFILES
;Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
@@ -317,6 +316,8 @@ FunctionEnd
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
+ !insertmacro MUI_PAGE_INSTFILES
+
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
@@ -366,6 +367,31 @@ SectionEnd
;--------------------------------
+; determine admin versus local install
+Function un.onInit
+
+ ClearErrors
+ UserInfo::GetName
+ IfErrors noLM
+ Pop $0
+ UserInfo::GetAccountType
+ Pop $1
+ StrCmp $1 "Admin" 0 +3
+ SetShellVarContext all
+ ;MessageBox MB_OK 'User "$0" is in the Admin group'
+ Goto done
+ StrCmp $1 "Power" 0 +3
+ SetShellVarContext all
+ ;MessageBox MB_OK 'User "$0" is in the Power Users group'
+ Goto done
+
+ noLM:
+ ;Get installation folder from registry if available
+
+ done:
+FunctionEnd
+
+;--------------------------------
;Uninstaller Section
Section "Uninstall"
@@ -394,6 +420,7 @@ Section "Uninstall"
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
startMenuDeleteLoop:
+ ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."