I probably shouldn't even reply here as this just sounds like a
really, really, really bad idea. I'm hoping this is for an internal
application for an internal business requirement, and not for any
publicly released software.

Hiding the uninstall button is easy, just use ARPNOREMOVE.

If you're really wanting to persist down this path, you You won't be
able to "disable" installation using msiexec, just abort it. Probably
with a condition based on the REMOVE and UPGRADINGPRODUCTCODE
properties.

A user can always remove the program with a combination of MSIZAP and
deleting files/registry components if they've got elevated
permissions. You're not going to prevent anything, just make it harder
for the user to do so and make it more likely that they'll screw their
computer in the process of doing so. Then you'll end up supporting
crazy weird environments if the user later reinstalls the app....
think carefully before you take this path.


Sascha

On Tue, Aug 4, 2009 at 4:42 PM, Lian Jiang<lji...@microsoft.com> wrote:
> Thanks Bob for reply.
>
> By design, it is ok for the privileged user to hack to uninstall my app (e.g. 
> change registry, delete files). However, I don't want my MSI to be used to 
> uninstall the app.
>
> Is it possible to disable uninstallation in my msi to achieve below goals?
>
>        1. A user right clicks my application item in Add/Remove programs, he 
> can only see repair option, no remove option.
>
>        2. A user cannot uninstall my application by using "msiexec /x my.msi 
> /q".
>
>
> Thanks
> Lian
>
> -----Original Message-----
> From: Bob Arnson [mailto:b...@joyofsetup.com]
> Sent: Monday, August 03, 2009 6:24 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] is it possible to disable user uninstall while still 
> enable major upgrade?
>
> Lian Jiang wrote:
>> I agree it sounds like a strange requirement for most projects which I 
>> didn't even believe at the beginning. But it is legitimate for my project 
>> due to some business reason...
>>
>> Can this be done technically?
>>
>
> Users already have to elevate to do the uninstall; once they have admin
> privs, they can do anything they want to the machine (OS components
> excepted).
>
> --
> sig://boB
> http://joyofsetup.com/
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to