Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 48729 invoked from network); 4 Mar 2008 15:13:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2008 15:13:55 -0000 Received: (qmail 23135 invoked by uid 500); 4 Mar 2008 15:13:51 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 23072 invoked by uid 500); 4 Mar 2008 15:13:51 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 23061 invoked by uid 99); 4 Mar 2008 15:13:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 07:13:51 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 15:13:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7A5281A9832; Tue, 4 Mar 2008 07:13:32 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r633508 - /directory/studio/branches/1.1.0/tools/Windows Installer/windows_installer.nsi Date: Tue, 04 Mar 2008 15:13:31 -0000 To: commits@directory.apache.org From: pamarcelot@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080304151332.7A5281A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: pamarcelot Date: Tue Mar 4 07:13:30 2008 New Revision: 633508 URL: http://svn.apache.org/viewvc?rev=633508&view=rev Log: Fix for DIRSTUDIO-289 (Windows Installer should detect previous installation and propose to uninstall it before installing the newest). Modified: directory/studio/branches/1.1.0/tools/Windows Installer/windows_installer.nsi Modified: directory/studio/branches/1.1.0/tools/Windows Installer/windows_installer.nsi URL: http://svn.apache.org/viewvc/directory/studio/branches/1.1.0/tools/Windows%20Installer/windows_installer.nsi?rev=633508&r1=633507&r2=633508&view=diff ============================================================================== --- directory/studio/branches/1.1.0/tools/Windows Installer/windows_installer.nsi (original) +++ directory/studio/branches/1.1.0/tools/Windows Installer/windows_installer.nsi Tue Mar 4 07:13:30 2008 @@ -18,8 +18,8 @@ # !define AppName "Apache Directory Studio" -!define AppVersion "1.1.0 RC" -!define OutFile "Apache_Directory_Studio_1.1.0_RC_Windows" +!define AppVersion "1.1.0 RC2" +!define OutFile "Apache_Directory_Studio_1.1.0_RC2_Windows" !define ShortName "Apache Directory Studio" !define JRE_VERSION "1.5.0" !define Vendor "Apache Software Foundation" @@ -184,6 +184,34 @@ SetCurInstType 0 SetAutoClose false StrCpy $STUDIO_HOME_DIR "$PROGRAMFILES\Apache Directory Studio" + + ;Verifying if Studio is already installed + ReadRegStr $R0 HKLM \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\${Project} Studio" \ + "UninstallString" + StrCmp $R0 "" done + + ;Studio is already installed + ;Asking before running the uninstaller + MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ + "${AppName} is already installed. $\n$\nClick 'OK' to remove the \ + previous version $\nor 'Cancel' to cancel this installation." \ + IDOK uninst + Abort + + ;Running the uninstaller + uninst: + ClearErrors + ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file + + 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. + no_remove_uninstaller: + + done: FunctionEnd ;--------------------------------