cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
seaktf
Level 4

Possible NOT to allow "modify" and "repair" on running the setup?

I'm making a very simple InstallScript project which installs a set of files and then runs a command to install the service. And during uninstallation, another command is run before removing files.

I need it to be simple: so only the "Remove" button is allowed to display in "Add or Remove Programs" window.

However, I've just found that if the user runs the setup.exe once again, he has the "Modify, repair, or remove the program" dialog! Is it possible NOT to display this dialog? Or display a dialog which only allows "Remove" or "Cancel"?

TIA
Labels (1)
0 Kudos

(7) Replies
mitutoyo
Level 4

In the General Information section, Add or Remove Programs area, if you set the Disable Change Button property to YES, would this not resolve your issue?
0 Kudos
seaktf
Level 4

No.

Doing so just remove the "Change" button in "Add or Remove Programs" window, as I had already written in my original post.
0 Kudos
rrinblue22
Level 9

You can edit the Maintenance dialog and delete the Radio button 'Modify' and 'Repair'. This would just display the Remove button.

Hope this helps.
0 Kudos
seaktf
Level 4

No, not really.

I'd rather expect that we could using parameters other than doing this low-level change.
0 Kudos
mitutoyo
Level 4

So when a user launches setup.exe on a machine that already has your product installed, you would like it to behave in the same way as if the user was in Add/Remove Programs (remove only option)?

In that case, your best bet may be to modify the OnMaintUIBefore event so it is forced into the REMOVEALL branch of code. Of course, if you are using the program . . . endprogram stream you'll have to call the event explicitly, probably based on the MAINTENANCE property.

Hope this helps.
0 Kudos
seaktf
Level 4

mitutoyo wrote:
So when a user launches setup.exe on a machine that already has your product installed, you would like it to behave in the same way as if the user was in Add/Remove Programs (remove only option)?


Yes, exactly.

mitutoyo wrote:
In that case, your best bet may be to modify the OnMaintUIBefore event so it is forced into the REMOVEALL branch of code. Of course, if you are using the program . . . endprogram stream you'll have to call the event explicitly, probably based on the MAINTENANCE property.


I've just taken a look at OnMaintUIBefore. That's quite a long function. But I suppose I just need to change
nType = MODIFY;
to
nType = REMOVEALL;
at the very beginning of the function.
0 Kudos
mitutoyo
Level 4

Either that or remove all code that doesn't relate to REMOVEALL. Since you are running program . . . endprogram, you have complete control over the function since Installshield will never automatically execute it.
0 Kudos