directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r763618 - /directory/studio/trunk/tools/Windows Installer/windows_installer.nsi
Date Thu, 09 Apr 2009 12:14:50 GMT
Author: pamarcelot
Date: Thu Apr  9 12:14:50 2009
New Revision: 763618

URL: http://svn.apache.org/viewvc?rev=763618&view=rev
Log:
Fixed the launch of the uninstaller when Studio is already installed.

Modified:
    directory/studio/trunk/tools/Windows Installer/windows_installer.nsi

Modified: directory/studio/trunk/tools/Windows Installer/windows_installer.nsi
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tools/Windows%20Installer/windows_installer.nsi?rev=763618&r1=763617&r2=763618&view=diff
==============================================================================
--- directory/studio/trunk/tools/Windows Installer/windows_installer.nsi (original)
+++ directory/studio/trunk/tools/Windows Installer/windows_installer.nsi Thu Apr  9 12:14:50
2009
@@ -136,8 +136,12 @@
         SetAutoClose false
     
         # Verifying if the application is already installed
-        ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${Application}"
"UninstallString"
+        ReadRegStr $R0 "${INSTDIR_REG_ROOT}" "${INSTDIR_REG_KEY}" "UninstallString"
         StrCmp $R0 "" done
+        
+        # Getting install location
+        ReadRegStr $R1 "${INSTDIR_REG_ROOT}" "SOFTWARE\${Application}" "InstallDir"
+        StrCmp $R1 "" done
     
         # The application is already installed
         # Asking before running the uninstaller
@@ -147,7 +151,7 @@
       
         # Running the uninstaller
         uninst:
-            ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
+            ExecWait '$R0 _?=$R1'
             
         done:
             # Preparing the uninstall log
@@ -181,6 +185,9 @@
         
         # Closing uninstall log
         !insertmacro UNINSTALL.LOG_CLOSE_INSTALL
+        
+        # Storing install location
+        WriteRegStr "${INSTDIR_REG_ROOT}" "SOFTWARE\${Application}" "InstallDir" "$INSTDIR"
 
         # Creating directories in the start menu
         CreateDirectory "$SMPROGRAMS\Apache Directory Studio"



Mime
View raw message