Index: win_installer/src/installer.nsi =================================================================== diff -u -rf80101622c21ea70366002b828eef373ad9dfd9c -r201c347838fae0666b259a4a3e14dbd9c9a3a046 --- win_installer/src/installer.nsi (.../installer.nsi) (revision f80101622c21ea70366002b828eef373ad9dfd9c) +++ win_installer/src/installer.nsi (.../installer.nsi) (revision 201c347838fae0666b259a4a3e14dbd9c9a3a046) @@ -405,8 +405,8 @@ instdirExists: ; CHECK if there are files retained from a previous uninstall ; THEN after installation, overwrite retained files and free files from temp folder temp folder + strcpy $6 "" - IfFileExists "$INSTDIR\repository" repositoryExists noRepository repositoryExists: strcpy $6 "$6- Repository and uploaded files from previous installation$\n" @@ -427,13 +427,22 @@ MessageBox MB_YESNO|MB_ICONQUESTION "Installer has detected some files retained from a previous install, do you wish to use them? $\n$\n$6" \ IDYES retainFiles \ - IDNO newInstDir + IDNO newInstDir retainFiles: - Strcpy $WINTEMP "C:\WINDOWS\Temp" - Strcpy $RETAIN_FILES "1" - CopyFiles $INSTDIR $WINTEMP - #MessageBox MB_OK|MB_ICONEXCLAMATION "$RETAIN_FILES \n $RETAIN_REP $\n $RETAIN_CONF $\n $RETAIN_DB" + Strcpy $WINTEMP "C:\WINDOWS\Temp" + Strcpy $RETAIN_FILES "1" + CopyFiles $INSTDIR $WINTEMP + #MessageBox MB_OK|MB_ICONEXCLAMATION "$RETAIN_FILES \n $RETAIN_REP $\n $RETAIN_CONF $\n $RETAIN_DB" newInstDir: + # Remove retained files and begin installation + ##################test this again + /* + Strcpy $RETAIN_FILES "0" + Strcpy $RETAIN_CONF "0" + Strcpy $RETAIN_DB "0" + Strcpy $RETAIN_REP "0" + RMdir /r $INSTDIR + CreateDirectory $INSTDIR*/ FunctionEnd @@ -834,15 +843,15 @@ Function OverWriteRetainedFiles ${if} $RETAIN_REP == "1" #copy repository and uploaded files to install directory - MessageBox MB_OK|MB_ICONSTOP "repository files to be retained" + #MessageBox MB_OK|MB_ICONSTOP "repository files to be retained" CopyFiles "$WINTEMP\lams\repository" "$INSTDIR\" DetailPrint "$INSTDIR\repository" CopyFiles "$WINTEMP\lams\jboss-4.0.2\server\default\deploy\lams.ear\lams-www.war" "$INSTDIR\jboss-4.0.2\server\default\deploy\lams.ear\" DetailPrint "Overwrite $INSTDIR\jboss-4.0.2\server\default\deploy\lams.ear\lams-www.war" ${endif} ${if} $RETAIN_CONF == "1" #copy configuration files to be kept - MessageBox MB_OK|MB_ICONSTOP "CONF files to be retained" + #MessageBox MB_OK|MB_ICONSTOP "CONF files to be retained" CopyFiles "$WINTEMP\lams\jboss-4.0.2\server\default\conf\log4j.xml" "$INSTDIR\jboss-4.0.2\server\default\conf\log4j.xml" CopyFiles "$WINTEMP\lams\jboss-4.0.2\server\default\deploy\jbossweb-tomcat55.sar" "$INSTDIR\jboss-4.0.2\server\default\deploy\jbossweb-tomcat55.sar\server.xml" ${endif} @@ -876,6 +885,7 @@ Delete "$TEMP\update_lams_configuration.sql" Delete "$TEMP\login-config.xml" Delete "$INSTDIR\update_lams_configuration.sql" + RMDIR /r "$WINTEMP\lams" FunctionEnd Function .onInstFailed