Loading
abort
In my basic msi project I use "abort" in the script. But whatever the setup does, it does not abort!. I also tried Do(EXIT).\

 

Under certain circumstances I want the script and setup to abort (for example, when the vista version doesn't have SP1 or when XP doesn't have the windows installer 3.1 installed).

 

How do I force the setup to abort??

 

Henri

  • Community Manager (Flexera Software)

    To test system requirements in a Basic MSI project, you might consider an Install Condition (or launch condition), which you can define in the Product Properties view.

     

    In general, to exit an installer from an InstallScript (or MSI DLL) action, your function should return ERROR_INSTALL_FAILURE. Another approach is to set a property (ACTION1FAILED, say) in your action, and then, follow your action with an Error custom action that's conditioned with ACTION1FAILED, and which displays a custom message.
    Expand Post
  • Thanks for the answer. (I do have one of your books ;-)) .

     

    I cannot use the settings of the project because this message isn't for all users. Only for the users of winXP/2000 without the windows installer 3.1 and for Vista users without servicepack 1., BUT not for all of them. Only for those who are going to silently install Pervasive 10.1!!

     

    I will try to see if your other suggestions are possible for me...

     

    henri
    Expand Post
  • The problem is, that it is in the middle of the script. I don't understand where the commands Do(EXIT) or abort are for, if not for aborting the script. The script does not do anything with those commands(??)

     

    Could anyone please explain how to do that?
  • Community Manager (Flexera Software)

    I gather abort and Do(EXIT) are for InstallScript projects (and perhaps InstallScript MSI projects), where InstallScript custom actions in a Basic MSI project expect functions to return ERROR_SUCCESS on success and ERROR_INSTALL_FAILURE otherwise...
  • ok. But how can I return an ERROR_INSTALL_FAILURE from the function then as you suggested. I tried to call a function in the middle of the script that returned such an error, but the setup just went on installing ;-)

     

    How should such a function look like?
  • Community Manager (Flexera Software)

    The help topic "Writing Entry-Point Functions" has an example; the general idea is:

     

    export prototype ExitInstaller(HWND);

     

    function ExitInstaller(hInstall)

     

    begin

     

    // decide you want to exit...

     

    return ERROR_INSTALL_FAILURE;

     

    end;
    Expand Post
  • allright. I will try to build in such a function, but i will do it before entering the very long script. Thanks. I will let you know how I will end up. But that will be next monday. Thank you very much....

     

    henri

Loading
abort