Page 1 of 1

installer doesn't start after uninstall.

Posted: Tue Aug 07, 2012 11:26 am
by norbertjurkiewicz
I had a working project and something changed. Previously after a prerequisite unistall the installer started now it doesn't anymore, it just goes to the end.

Code: Select all

[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)
  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 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, ...
      Terminate Installation
    end
    if Variable REMOVEOLD Equals REBOOT
      MessageBox: $TITLE$ Setup, Your computer needs ...
      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 2.0]
  Include Script: setupmsi20
  [compiler end]
  Hide Dialog
end


Did somekind fo a jump to a label get deleted?


This is a no maintance setup. Just Install... If already installed then uninstall/install.

Thank you.

Re: installer doesn't start after uninstall.

Posted: Tue Aug 07, 2012 12:16 pm
by FrancescoT
Dear User,

have you tried to verify which is the returned value by:
- Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)

using a Messagebox (for example)?

Regards

Re: installer doesn't start after uninstall.

Posted: Tue Aug 07, 2012 12:37 pm
by norbertjurkiewicz
I found the following.

If I rebuild the setup the installer functions as I expect. The previous version get uninstalled and the installer continues to install the new version. However, if I run the same exact installer again. The installer uninstalls the product and does NOT go on to install, it just exits. Is there a way to make this behavior consistant?

Re: installer doesn't start after uninstall.

Posted: Wed Aug 08, 2012 11:28 am
by FrancescoT
I suspect that exist a problem with your script ... very probably an unwanted statement.
Obviously I can say much more because I don't have idea of what accually happens there.

If you create a dummy project fron scratch (using any template sample available), without doing anything else (as adding files or else).
Then build then project and test it. I am sure you will be able to verify that this will not work has you have found.

If you compare your main script with the one generated with the sample template, I am sure that you can isolate your issue.

Regards