diff options
author | Jeffrey Altman <jaltman@secure-endpoints.com> | 2004-09-13 21:38:33 +0000 |
---|---|---|
committer | Jeffrey Altman <jaltman@secure-endpoints.com> | 2004-09-13 21:38:33 +0000 |
commit | f1e3c0c4e99a9b1580e779d58559ede21432c494 (patch) | |
tree | d18227c63d511f9310ea70412e18afa83b588b3e | |
parent | 19ba2ebe8755077f26d69d90e7d878287254c7de (diff) | |
download | krb5-f1e3c0c4e99a9b1580e779d58559ede21432c494.zip krb5-f1e3c0c4e99a9b1580e779d58559ede21432c494.tar.gz krb5-f1e3c0c4e99a9b1580e779d58559ede21432c494.tar.bz2 |
* kfw-fixed.nsi:
Detect the Wix MSI, the SWRT MSI, and the Pismere MSI
If found, uninstall the MSI before installing NSIS
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16749 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/windows/installer/nsis/ChangeLog | 7 | ||||
-rw-r--r-- | src/windows/installer/nsis/kfw-fixed.nsi | 95 |
2 files changed, 99 insertions, 3 deletions
diff --git a/src/windows/installer/nsis/ChangeLog b/src/windows/installer/nsis/ChangeLog index b879b3a..3a0cd14 100644 --- a/src/windows/installer/nsis/ChangeLog +++ b/src/windows/installer/nsis/ChangeLog @@ -1,3 +1,10 @@ +2004-09-13 Jeffrey Altman <jaltman@mit.edu> + +* kfw-fixed.nsi: + + Detect the Wix MSI, the SWRT MSI, and the Pismere MSI + If found, uninstall the MSI before installing NSIS + 2004-09-07 Jeffrey Altman <jaltman@mit.edu> * kfw-fixed.nsi: diff --git a/src/windows/installer/nsis/kfw-fixed.nsi b/src/windows/installer/nsis/kfw-fixed.nsi index 7eeda64..4253ba9 100644 --- a/src/windows/installer/nsis/kfw-fixed.nsi +++ b/src/windows/installer/nsis/kfw-fixed.nsi @@ -624,17 +624,17 @@ checkprevious: ReadRegStr $R0 HKLM \ "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \ "DisplayVersion" - IfErrors contInstall + IfErrors testWIX StrCmp $R0 "${KFW_VERSION}" contInstall MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ "${PROGRAM_NAME} is already installed. $\n$\nClick `OK` to remove the \ previous version or `Cancel` to cancel this upgrade or downgrade." \ - IDOK uninst + IDOK uninstNSIS Abort ;Run the uninstaller -uninst: +uninstNSIS: ReadRegStr $R0 HKLM \ "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \ "UninstallString" @@ -652,6 +652,95 @@ uninst: Pop $R1 StrCmp $R1 "1" Restart DoNotRestart +testWIX: + ClearErrors + ReadRegStr $R0 HKLM \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\{FD5B1F41-81BB-4BBC-9F7E-4B971660AE1A}" \ + "DisplayVersion" + IfErrors testSWRT + + MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ + "${PROGRAM_NAME} is already installed. $\n$\nClick `OK` to remove the \ + previous version or `Cancel` to cancel this installation." \ + IDOK uninstMSI1 + Abort + +;Run the uninstaller +uninstMSI1: + ClearErrors + ExecWait 'MSIEXEC /x{FD5B1F41-81BB-4BBC-9F7E-4B971660AE1A} /passive /promptrestart' + + IfErrors no_remove_uninstaller + ;You can either use Delete /REBOOTOK in the uninstaller or add some code + ;here to remove the uninstaller. Use a registry key to check + ;whether the user has chosen to uninstall. If you are using an uninstaller + ;components page, make sure all sections are uninstalled. + + Push $R1 + Call RestartRequired + Pop $R1 + StrCmp $R1 "1" Restart DoNotRestart + +testSWRT: + ClearErrors + ReadRegStr $R0 HKLM \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\{61211594-AAA1-4A98-A299-757326763CC7}" \ + "DisplayVersion" + IfErrors testPismere + + MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ + "${PROGRAM_NAME} is already installed. $\n$\nClick `OK` to remove the \ + previous version or `Cancel` to cancel this installation." \ + IDOK uninstMSI2 + Abort + +;Run the uninstaller +uninstMSI2: + ClearErrors + ExecWait 'MSIEXEC /x{61211594-AAA1-4A98-A299-757326763CC7} /passive /promptrestart' + + IfErrors no_remove_uninstaller + ;You can either use Delete /REBOOTOK in the uninstaller or add some code + ;here to remove the uninstaller. Use a registry key to check + ;whether the user has chosen to uninstall. If you are using an uninstaller + ;components page, make sure all sections are uninstalled. + + Push $R1 + Call RestartRequired + Pop $R1 + StrCmp $R1 "1" Restart DoNotRestart + +testPismere: + ClearErrors + ReadRegStr $R0 HKLM \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\{83977767-388D-4DF8-BB08-3BF2401635BD}" \ + "DisplayVersion" + IfErrors contInstall + + MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ + "${PROGRAM_NAME} is already installed. $\n$\nClick `OK` to remove the \ + previous version or `Cancel` to cancel this installation." \ + IDOK uninstPismere + Abort + +;Run the uninstaller +uninstPismere: + ClearErrors + ExecWait 'MSIEXEC /x{83977767-388D-4DF8-BB08-3BF2401635BD} /passive /promptrestart' + + IfErrors no_remove_uninstaller + ;You can either use Delete /REBOOTOK in the uninstaller or add some code + ;here to remove the uninstaller. Use a registry key to check + ;whether the user has chosen to uninstall. If you are using an uninstaller + ;components page, make sure all sections are uninstalled. + + Push $R1 + Call RestartRequired + Pop $R1 + StrCmp $R1 "1" Restart DoNotRestart + + + Restart: MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "Please reboot and then restart the installer." Abort |