BrianRHobbs
Posts: 20
Joined: Tue Jun 24, 2008 11:13 am

best practice for preventing repair/modify

Hi There,

I'm hoping someone can provide me with some best practice on preventing the repair/modify options for my installer. Basically, I do not want the user to be able to repair or modify my package - all they can do is install it and then uninstall it. A bit draconian maybe, but it's what we're after.

I've checked both boxes on the product details page, but this only controls the options shown in control panel - if you re-run the installer it goes into the modify dialogs, presenting you with modify & repair buttons.

So, The way I see to do this would be to remove the MaintenanceTypeDialog and go directly from the MaintenanceWelcomeDlg to the VerifyRemoveDlg (setting any relevant properties along the way?)

is that the best way to do this, or is there a better way?

Thanks in advance,
Brian
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: best practice for preventing repair/modify

Hi Brian,
The way I see to do this would be to remove the MaintenanceTypeDialog and go directly from the MaintenanceWelcomeDlg to the VerifyRemoveDlg (setting any relevant properties along the way?)
Microsoft recommends to use this dialog, so it takes a little work to override the recommended dialog sequence. The solution is to skip this dialog by manipulating the control events (like you thought). Here is the general idea:
- the "NewDialog" published control event for the "Next" button on "MaintenanceWelcomeDlg" should be configured with a false condition
- for the same button you should create another NewDialog control event which always launches "VerifyRemoveDlg"
- the "Back" button on "VerifyRemoveDlg" should launch "MaintenanceWelcomeDlg" instead of "MaintenanceTypeDlg"
- the "Next" button on "MaintenanceWelcomeDlg" should contain all published events defined for the "Remove" button on "MaintenanceTypeDlg"

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BrianRHobbs
Posts: 20
Joined: Tue Jun 24, 2008 11:13 am

Re: best practice for preventing repair/modify

Thanks for that cosmin.

Return to “Common Problems”