Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Setup cancel problem


5 replies to this topic

spacer21

spacer21
  • Members
  • 19 posts

Posted 16 July 2004 - 07:53

hi,

i have included a customized script in my setup which runs SQL files to perform different operations on database.

when i cancels the setup, before my script runs, it cancels the setup. but when my script starts executing and i tend to cancel the setup it displays confirmation message and either i chose Yes or No it does not stop executing my script.

i sequenced my script after install finalize, because the script needs the copied files.

is there any way to stop the executing script?

is there any handler for this purpose? i.e it catches the cancel setup command.

Regards

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 16 July 2004 - 08:53

MSI has no built in functionality to kill a running custom action. I expect the setup to exit after your custom action has finished in this case.
If you want to interrupt your custom action maybe you can split it into steps that are called one after the other so you can interrupt in between. Or the custom action must run in an external process that checks back to see if the MSI is still running from time to time.

spacer21

spacer21
  • Members
  • 19 posts

Posted 19 July 2004 - 11:16

hi,

i m doing this by InstallScript and not from any dll.

i made a property "WQ" and set it to "0". when user clicks cancel button this property is set to "1" (i did this by a custom action which is fired before EndDialog). inside the loop which runs queries this property is checked, if it is "1" then exit else continue. but this too is not working and i m amazed that it even doesnt change this property to "1" on Cancel click.

where i m doing wrong?

when button is clicked 1st time Cancel Setup dialog box is shown and after 1st time doesnt displayed. i guess this is because the action "EndDialog" with attribute "Exit" is executed. can anyone help !!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 July 2004 - 14:07

Is your script custom action scheduled for immediate execution or deferred execution? (Deferred custom actions can't change proeprty values)
Is it synchroneous or asynchroneous? (In the first case MSI processing pauses and waits for your custom action to return, so you would have to use the latter)

spacer21

spacer21
  • Members
  • 19 posts

Posted 22 July 2004 - 12:19

hi,

it is synchronous and is scheduled for immediate execution.

can it be done by changing msi run mode ?

regards

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 July 2004 - 09:21

Since it's synchroneous MSI is waiting for your custom action to return.
Take a look at topic "Authoring a Conditional "Please Wait . . ." Message Box" in MSI Help for a possible solution.