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.
mirik123Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vadim RappCommented:
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.
0
mirik123Author Commented:
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?
0
Vadim RappCommented:
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 .

0
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

mirik123Author Commented:
Hi.
No, it doesn't work.
I see the changes on the dialog only when I do next->back to another dialog.
0
Vadim RappCommented:
here's a sample. On the welcome screen, click "run code" and watch the button "next"
TEST.txt
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vadim RappCommented:
...rename test.txt to test.msi
0
mirik123Author Commented:
vadimrapp1, Hi.

Thanks for you response.
The solution is working. I'll add it to my project.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.