[Windows 10] Command to uninstall Office 365 silently and automatically

Tips / Knowledge

Hello!This time I would like to introduce the command to uninstall Office 365 silently.

I used to call it Office 365 (also known as o365), but now it seems that it is available under the name Microsoft 365 (also known as m365).
Since the name has been changed in detail, it is difficult to unify it ... I think that those who read this article can understand the situation around that.In this article, we will unify the notation in Office 365.

So, although it is a silent uninstall of the main subject, I could not find very good information on the Internet.Therefore, as a result of trying various things on my own, it has become a form for the time being, so I will publish it at the information sharing level.

When using it, please check your own environment carefully and take your own risk.

Thing you want to do

-Silently uninstall Office 365 with just a command

-No other input is required after executing the command

If you want to uninstall Office365, you usually click Uninstall from the application list screen.It's not too much trouble if there are only a few, but it's very troublesome if there are dozens, hundreds, and so on. The feeling is that you want to reduce it with just one click.

Also, even when preparing in a batch script etc., extra input often becomes a barrier to automation, so this time the goal is to be able to complete the uninstallation without requiring other input when executing the command. Did.

Command example

This time it is for ProPlus of O365, version 16.0.
You may need to change it according to your own environment, so please read the explanation below before executing it.

"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=O365ProPlusRetail.16_ja-jp_x-none culture=ja-jp version.16=16.0 displaylevel=false

Commentary

Command configuration

This time, the command is a combination of the two elements.

[(XNUMX) Uninstall command] + [(XNUMX) Silent and automatic options]

I will explain these two elements.

① Uninstall command

The command to uninstall Office365 used the uninstall command in the registry.

HKLM \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall

I think the name of the application is listed in this registry.
When you click on the desired Office product to open it, you will find a key called "Uninstall String".
This value is the command that will be executed when uninstalling from the setting screen.

"C: \ Program Files \ Common Files \ Microsoft Shared \ ClickToRun \ OfficeClickToRun.exe" scenario = install scenariosubtype = ARP sourcetype = None productstoremove = O365ProPlusRetail.16_ja-jp_x-none culture = ja-jp version.16 = 16.0

In my environment, I installed it with O365ProPlus 16.0, so the command looks like this.I think that this part will change depending on the product introduced, so at runtimeBe sure to check this registry.

② Silent execution option

Even if this command is executed as it is, the following dialog will be displayed, which is not preferable for automation.

The dialog that appears when you click the uninstall button

Add the following option to the command to execute this automatically.

displaylevel = false

This option is an option of "OfficeClickToRun.exe" that runs without displaying anything on the screen.
It's a program for controlling Office 365 and other Click-to-Run versions of Office products, but I wasn't surprised how to find out about options for this.

For the time being, I found out that the "display level" is an option that can suppress the screen display and execute it automatically, so I was able to realize automatic and silent uninstallation.

Afterword

This time, I introduced the command to uninstall Office 365 automatically and silently.

I think this kind of command is indispensable for operations such as automation and mass kitting.
I also had a client request, but I was in trouble because I couldn't find any information.

I tried various things, but I think this is probably the simplest mechanism.
In the first place, OfficeClickToRun.exe, which is the basis of the command, is also officially set as an uninstall command.

I'm glad I found that it can be incorporated into automation just by adding an option to it.

But where is this information published?
I found it by searching appropriately, but it should be a list of options or something that can be found immediately.

If anyone reading this article has information such as "Here it is", I would appreciate it if you could let me know in the comments.

I hope it helps you.

Comment

  1. Tariq Than:

    Hi,
    Thanks for posting the article. I tried with DisplayLevel=FALSE but command doesn't do anything. As soon as I remove DisplayLevel=FALSE it works but prompts for the uninstallation which not desired.

    Can you please help?

    Thanks

    • Fas Than:

      thanks for your comment
      I can't see your screen so I can't give you exact advice, but I think the uninstall is probably failing.
      the uninstall succeed with showed prompt?
      If it seems to fail with some kind of error code, maybe there's something you can do.

Translate »
I copied the title and URL