Link to home
Start Free TrialLog in
Avatar of mirik123
mirik123

asked on

How to repaint dialog window in Basic MSI?

Hi.

I'm using basic MSI project.
I have a pushbutton with linked installscript custom action with immediate execution.
I need to disable Cancel button at the begining of script run and to enable it back at the end of the script.
The problem is that the current window is not repained and I can change the button view only to the next dialog.
Avatar of Vadim Rapp
Vadim Rapp
Flag of United States of America image

Sorry, but the only comment will be this: using installscript is really bad idea. Installscript engine has been responsible for the infinite number of user problems, for decades.
Avatar of mirik123
mirik123

ASKER

I tried to change the properties linked to Enable/Disable conditions for the button but they are in effect for the next window only.
May be I can send some standard windows message at the end of the script and it will affect the windows I'm currently on?
Here's what you can do:

1. create new property MyFlag with initial value 0

2. for the command button, put two other events before and after your call for the custom action. First event sets property MyFlag to 1, then goes the action, then another event sets property MyFlag to 0

3. for the button Next, specify two conditions: action Disable with condition MyFlag=1, and action Enable with condition MyFlag=0 .

Hi.
No, it doesn't work.
I see the changes on the dialog only when I do next->back to another dialog.
ASKER CERTIFIED SOLUTION
Avatar of Vadim Rapp
Vadim Rapp
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
...rename test.txt to test.msi
vadimrapp1, Hi.

Thanks for you response.
The solution is working. I'll add it to my project.