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?
 
Vadim RappCommented:
here's a sample. On the welcome screen, click "run code" and watch the button "next"
TEST.txt
0
 
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
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
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
 
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:
...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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.