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

Disable/Enable Cancel button for Basic MSI


4 replies to this topic

Barvaz

Barvaz
  • Full Members
  • 37 posts

Posted 07 May 2012 - 09:50

Hi,
I'm writing new setup using basic MSI 2012.
My question is how can I enable/disable Cancel button in dialog.
When I click on 'Remove' command in Uninstall dialog, the Remove command execute install Script function that uninstall third parties software.
During the uninstall process of the third parties, I would like to disable the Cancel button and when the uninstall terminated then enable the Cancel button.
It seems to me, that I need to write code at the beginning of the function which disable the Cancel button and in the end of the function to enable the Cancel button.
Please Advice,
Thanks.


Barvaz

Barvaz
  • Full Members
  • 37 posts

Posted 09 May 2012 - 15:41

Basic MSI 2012 - How can i enable / disable Cancel button from install script?
Please advice
Thanks

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 09 May 2012 - 18:19

I'm not sure if this would work, but you could try adding enable/disable events to the button with a condition based on a property. Set this property either before you launch the InstallScript or inside the InstallScript.
If that doesn't work you may need to dispable the Canel button alltogether, not just for this one custom action.

Barvaz

Barvaz
  • Full Members
  • 37 posts

Posted 10 May 2012 - 15:32

I tried your first suggestion with no success!
I can't believe there is no way to control dialog's button from install script basic MSI, but you're the expert and I trust you! :-)
Thanks.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 May 2012 - 15:44

I'm not saying that it's impossible, because I never tried.
What I can tell you is: There's no built in function in InstallScript for that purpose (the Enable/Disable functions only work for InstallScript dialogs). Since the dialog is displayed by the Windows Installer engine and the InstallScript action is running in the InstallScript runtime engine, there's no direct connection between the two. You could try sending messages to the Windows Installer eingine to see if that works.