Hi
Here is my scenario. I developed version 2 of my application and I created a
setup project for it. When users run the installation file, I want to ask
them whether they want to uninstall old version (which is version 1.) In
VS.NET, I see the option "Remove old version" in the Property pane of the
setup project. So, is there anyway to hook up this action to a checkbox in a
custom UI dialog ?
Thanks in advance.
Dotnetjunky
Tim Macaulay[MSFT] - 26 May 2005 13:55 GMT
Great Question! Yes, you can create a custom UI dialog for this, but you
will need to create a public property in the MSI that you can reference and
set as a condition for the RemoveExistingProducts Action.
I would also review the Major Upgrade information on MSDN.
Major Upgrades
http://msdn.microsoft.com/library/en-us/msi/setup/major_upgrades.asp
Cheers,
Tim Macaulay
Microsoft Corp.
This posting is provided "AS IS" with no warranties, and confers no rights
Phil Wilson - 26 May 2005 18:05 GMT
Not by using the Visual Studio IDE, no. RemovePreviousVersions causes the
MSI file to contain an unconditional sequence of events that searches for
the prior version and uninstalls it (FindRelatedProducts,
RemoveExistingProducts). Like Tim says, you'd need to manually edit the MSI
file to add your checkbox condition property to one of those actions.

Signature
Phil Wilson [MVP Windows Installer]
----
> Hi
>
[quoted text clipped - 10 lines]
>
> Dotnetjunky
Dotnetjunky - 27 May 2005 10:57 GMT
Thanks for your reply. However, I don't know how to manully edit MSI file and
what actions I need to attach my checkbox condition property to. Can you shed
more light on it ?
Thanks
> Not by using the Visual Studio IDE, no. RemovePreviousVersions causes the
> MSI file to contain an unconditional sequence of events that searches for
[quoted text clipped - 15 lines]
> >
> > Dotnetjunky
Phil Wilson - 28 May 2005 22:28 GMT
That's a huge topic - there's the Windows Installer SDK, a tool called Orca
(search the web). It's why there are tools like these, many of which have
IDE support for what you want to do.
http://installsite.org/pages/en/msi/authoring.htm

Signature
Phil Wilson
[Microsoft MVP-Windows Installer]
> Thanks for your reply. However, I don't know how to manully edit MSI file
> and
[quoted text clipped - 29 lines]
>> >
>> > Dotnetjunky