Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
491 views
in Technique[技术] by (71.8m points)

windows Installer - uninstalling previous version when the versions differ in installation policy (per-user, per-machine)

We have a visio plugin (say, version 1) which was installed by the User with Admin rights as per-user (‘Just me’ otpion) and the msi installer was created using setup and deployment of visual studio. Later because of organization policy in place to revoke admin privileges for all users were revoked. So the new version (version 2) needs to be installed by a IT admin as per-machine (everyone option) in order for the plugin to be available for all users on that machine and also to uninstall the old version (version 1) installed by the User whose permissions were revoked.

We are trying to automate the uninstallation to avoid manual intervention. The utility works by detecting all installed instances of the application by looking at registry keys on that machine and forcing uninstall with msiexec. But msiexec fails to uninstall the version that was installed by other user with exitcode as 1605 - This action is only valid for the products that are currently installed

If the User (who installed the version 1 plugin) is given admin rights to uninstall the application, he is able to manually uninstall it that proves that the application not tampered and is in a state that can be uninstalled without any issues.

Any pointers about how to programmatically uninstall application installed on a machine that has been installed by the other user with ‘Just me’ option would really help

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It's not just a Visual Studio problem. Windows Installer doesn't allow the installation context (user/machine) to change durin an upgrade. You have to perform logon as the user profile(s) that did the installation(s) and remove them before installing the new per-machine install.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...