So I do some checks for previous versions of our software (InstallAnywhere/ InstallShield 6.1 etc.)
When the InstallAware Run Program action runs an old uninstaller (silently) from one of our legacy packages, the InstallAware screen loses focus and closes.
Here's my code, do you see anything? I sure don't!
[compiler if Variable BUILDMODE not Equals PATCH]
if Variable NEEDSUPGRADE Equals TRUE
Comment: Uninstall via Windows Installer
Set Variable PREREQ to TRUE
Set Variable PRELIST to $PRELIST$$NEWLINE$Previous Version Uninstallation
end
Include Script: checkmsi30
Include Script: checkvc81
if Variable RECOMMENDEDUPGRADE Equals TRUE
Comment: Uninstall via Native Engine
Set Variable PREREQ to TRUE
Set Variable PRELIST to $PRELIST$$NEWLINE$Previous Version Removal (InstallAware)
end
if Variable LEGACYIAEXISTS Equals TRUE
Comment: Uninstall via InstallAnywhere
Set Variable LEGACYEXISTS to TRUE
Set Variable PREREQ to TRUE
Set Variable PRELIST to $PRELIST$$NEWLINE$Previous Version Removal (InstallAnywhere)
end
if Variable LEGACYISEXISTS Equals TRUE
Set Variable LEGACYEXISTS to TRUE
Set Variable PREREQ to TRUE
Set Variable PRELIST to $PRELIST$$NEWLINE$Previous Version Manual Removal (InstallShield)
end
[compiler end]
<<Code Folding Region>>
[DEFINE REGION: Install Application Pre-Requisites]
Comment: Install setup pre-requisites
if Variable PREREQ not Equals FALSE
Display Dialog: prereq, wait for dialog to return (modal) <-- The panel shows correctly. I then click NEXT.
if Variable WIZARD Equals CANCEL
Terminate Installation
end
Display Dialog: progressprereq, use as progress dialog (non-modal)
[compiler if Variable BUILDMODE not Equals PATCH]
if Variable LEGACYEXISTS Equals TRUE
if Variable LEGACYISEXISTS Equals TRUE
MessageBox: Legacy version detected, A legacy version of Navisphere Storage System Initialization Wizard was detected and must be removed manually. Please uninstall Navisphere Storage System Initialization Wizard and retry this installation of $TITLE$ at a later time.
Terminate Installation <-- I've tested and this, it works.
end
if Variable LEGACYIAEXISTS Equals TRUE
Run Program $LEGACYIA$ -i silent (WAIT) <-- This will run, but then I lose the InstallAware screen/ and InstallAware closes?
Check for Process "remove.exe", get result into variable LEGACYREMOVE
while Variable LEGACYREMOVE Equals TRUE loop
Check for Process "remove.exe", get result into variable LEGACYREMOVE
wend
end
end
if Variable NEEDSUPGRADE Equals TRUE
Set Variable REMOVEOLD to
Set Variable ERROROLD to
Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
if Variable REMOVEOLD Equals ERROR
MessageBox: $TITLE$ Setup, Unable to uninstall old version of $TITLE$. Please uninstall it yourself using Control Panel Add-Remove Programs before attempting to install this product.$NEWLINE$$NEWLINE$$ERROROLD$
Terminate Installation
end
if Variable REMOVEOLD Equals REBOOT
MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
if Variable REBOOTNOW Equals OK
Reboot Computer and Resume Setup
else
Terminate Installation
end
end
Set Variable MAINTENANCE to FALSE
end
[DEFINE WEB MEDIA Microsoft Windows Installer 3.0]
Include Script: setupmsi30
[DEFINE WEB MEDIA Microsoft Visual C++ Runtime 8.0 (includes ATL and MFC) Service Pack 1]
Include Script: setupvc81
if Variable RECOMMENDEDUPGRADE Equals TRUE
Comment: Bind to external setup log
Set Variable NATIVE_LOGGING to $NATIVE_OLDLOG$
Set Variable NATIVE_ENGINE_MODE to $NATIVE_ENGINE$
Set Variable NATIVE_ENGINE to TRUE
Apply Uninstall (get result into variable NATIVE_UNINSTALL)
Set Variable NATIVE_ENGINE to $NATIVE_ENGINE_MODE$
if Variable NATIVE_UNINSTALL Equals REBOOT
MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
if Variable REBOOTNOW Equals OK
Reboot Computer and Resume Setup
else
Terminate Installation
end
else
if Variable NATIVE_UNINSTALL not Equals COMPLETE
MessageBox: $TITLE$ Setup, Unable to uninstall old version of $TITLE$. It is strongly recommended that you uninstall it yourself using Control Panel Add-Remove Programs before attempting to install this product.$NEWLINE$$NEWLINE$$LASTERROR$$NEWLINE$$NEWLINE$Click OK to quit $TITLE$ Setup.$NEWLINE$$NEWLINE$Click Cancel to continue $TITLE$ Setup anyways (not recommended).
if Variable NATIVE_ERROR Equals OK
Terminate Installation
end
end
end
Comment: Bind to internal setup log
Set Variable NATIVE_LOGGING to
end
[compiler end]
Hide Dialog
end
<<Code Folding Region>>
Installer Closing after Pre-Req panel
Re: Installer Closing after Pre-Req panel
Strange thing is, during debug, the welcome panel does popup and I don't see the error. During debug, Run Program $LEGACYIA$ -i silent (WAIT), does not execute either...
Re: Installer Closing after Pre-Req panel
Could you please send your project over to support at installaware.com?
Thanks!
Thanks!
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

