MSI: handling custom dialogs in Visual studio setup project

I have a custom dialog (with 2 radio buttons) in Visual Studio setup project
(2005). Is there anyway I can turn on/off showing the custom dialog based on
a registry key?

Basically, if a particular version of software is running (i am detecting
using a registry key) the custom dialog should not be shown, otherwise it
should be shown.

Thanks for the help.
Who is Participating?
Vadim RappConnect With a Mentor Commented:
This would be easy in more capable MSI-authoring tool, but in Visual studio setup project there's only one ugly way I can think of: put in custom action; the action would analyze registry key anddisplay its own dialog. That however would occur already during theactual installation, not at the initial user interface steps. Another, no less ugly way would be to put custom dialog and specify property "visible" for its controls as the property resulting from the system search for your registry key; so it would show up anyways, but empty. You could put up a text like "this page is intentionally left blank", lol.

Or you can patch resulting msi file with orca or other tool; figure out the place in the script where custom dialog is called, and put the condition such as "if property = ... then".

Third option would be probably to realize that your requirements far exceed capabitilies of VS environment, and get  more capable tool; or ask to help with your project someone already possessing that tool - rather than continue to struggle yourself with new limitation every week.
vizagboyAuthor Commented:
Vadim..i didnt understand the first option. Custom actions are executed during install phase and the user interfaces are shown before the installation begins. How does the user interface know the registry key value?
Vadim RappCommented:
That's what I said: user interface won't know. But if you can do whatever is the result of your custom dialog in the custom action (of which I have no idea), then it can ask and do it alltogether. For example, the following scenario is possible, and will work regardless of the phase.

search for competitors software by registry key
if found then
   show dialog and ask if the user wants to wipe it out for 10% discount on your product
   if yes, then wipe it out
end if

vizagboyAuthor Commented:
Looks like there is no straightforward solution in VS for this. Thanks for the information Vadim.
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.