Silently uninstall Visio with other Office Apps Open?

Courtney Regan 71 Reputation points
2023-03-20T18:59:51.41+00:00

Hello all - We are switching our licensing and thus we need to remove MS Visio from a few systems. As of today the supported way is to run the uninstall program with associated Visio uninstall XML file. However, users cannot have office applications open when this runs. This presents many issues: 

-It's mandatory and cannot be optional (e.g. user kicking off the uninstall process from Software Center or the like). 

-It can't be done 'off hours' as all of our users have laptops and the systems aren't on-line outside of business hours. 

-We have tried the uninstaller on a few systems as a logon/log off event. The problem is when the user logged in, they would immediately open an Office app and the Visio uninstaller would hang. 

-The BIGGEST problem is users with other office apps open. Everyone has Outlook open and we can't terminate it without any warning. God forbid folks lose data in excel! 

So, the issue is it must come off but the silent uninstaller will hang because other office apps are in use. If we make it not silent, then users can cancel the uninstallation. I opened a case with Microsoft and they confirmed it's not possible to uninstall an app if users have other apps open. If you ever had to do something like this, how did you do it without user interruption?

 

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,369 questions
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
942 questions
Microsoft Configuration Manager Application
Microsoft Configuration Manager Application
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Application: A computer program designed to carry out a specific task other than one relating to the operation of the computer itself, typically to be used by end users.
475 questions
Microsoft Configuration Manager
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 51,426 Reputation points
    2023-03-20T21:16:53.1366667+00:00

    As MS support pointed out, you can't. Office requires that all Office apps be shut down before it'll run the setup program.

    The only graceful way to do that is to ask each app to shut down by sending the close request to the active window. But this goes against your request that users not be notified since they would get a "are you sure" message and can say "No" which prevents the shutdown of the app. Even more complicated is the fact that Office supports being hosted out of process as a COM server. In that case there is no UI, you don't know what apps are using it and you cannot really shut it down.

    You'll need to make a decision on how important this is to you. Do you want to ensure Visio gets removed even if you have to forcefully close Office apps or are you OK with Visio sticking around for a while. If you are OK with Visio sticking around for a while then create a RunOnce entry on each machine that silently runs the Visio uninstaller. Then the uninstaller will run the next time the machine is rebooted and should run before the user has time to start anything and hence Office won't be running. That is probably how I'd do it. An alternative is to create a scheduled task to do the same thing but have it run only once. In either case the user will eventually have to reboot to get it removed but then there should be no issues removing it.

    1 person found this answer helpful.
    0 comments No comments

  2. Abraham Elizarraras 0 Reputation points
    2023-08-23T16:42:30.9133333+00:00

    I would suggest using PowerShell App Deployment Toolkit (PSADT) and leveraging its GUI capabilities in cohesion with MDT serviceUI.exe to then interactively deploy apps through MDM like Intune. You can use this method to run the uninstall program with associated Visio uninstall XML file. It will warn the users to close any O365 programs they have open before proceeding with the uninstall. PSADT has a built-in function called 'Show-InstallationWelcome' which can force close any process you specify like Winword.

    0 comments No comments