Activating Office Through The Command Line

Sometimes the Office activation procedure just won’t work for you. No matter how many times you try to get it to connect through the GUI it just won’t do it.¬†You will get this annoying error even though you’re connected to the internet and everything else is working just fine:

Error Recieved Trying to Activate Via Windows After SP2 Install
Really Office?

 

Well there’s a way to activate Office 2010, and probably Office 2007 through the command line. This also works with Office 2013, and I’m assuming Office 2016 as well.

Activating Microsoft Office 2007, Microsoft Office 2010 and Microsoft Office 2013 Through the Command Line

Step 1 – Click on your start menu and type “cmd”. This works with windows 8.1. If you’re using Windows 8 or Windows 10, just hit the Windows button on the keyboard and start typing.

Step 2 – Right click on the Command Prompt Icon and click “Run as Administrator”.

Step 3 – Type “cd \” to make sure you are at root.

Step 4 – Type “cd Program Files” (if you are running a 64 bit version of Windows with a 32 bit version of Office type ‘cd “Program Files (x86)”‘

Step 5 – Type “cd Microsoft Office”

Step 6 – Type “cd Office14” if you have Office 2010 “cd Office12” if you have Office 2007. This might work with older versions of Office. The folder you’re looking for will be “Office#”. If you have Office 2013 it will be Office15.

Step 7 – Type “cscript ospp.vbs /act”

Command Prompt Completed Activation
Note: This is for the 32bit version of Office. If it were the 64 bit it would say “Program Files” up at the top, not “Program Files (x86)”.

Office will be activated if your Product Keys were valid.

I’d like to thank Robert for providing the screen shots for this article.

Update 05/08/2017 – I just confirmed this works the same for Office 2013. I don’t have access to a retail copy of Office 2016 yet but if someone would like to let me know and send a screen shot I would definitely give you credit and use the screenshot. The only Office 2016 I have access to at the moment is a copy of Office 365.

6 Replies to “Activating Office Through The Command Line”

    1. It does work in Windows 7. Most of the computers I did this on were Windows 7 Professional x64 machines, couple 32 bit ones, and I’ve done it on a few home versions. Cscript.exe is usually found in your C:\Windows\System32 directory, but it’s also found in your C:\Windows\SysWow64, and a bunch of other places.

      There’s a known bug where the path to it on your machine gets all screwed up and Microsoft released a KB article about solving it, see if this works: https://support.microsoft.com/en-us/kb/248121

      Otherwise I’d do a “dir /s cscript.exe” from your root directory in the command prompt.

  1. I’m currently fighting for activation of my retail Office pro plus 2016. The command line you reported still works, at least it says the program is activated, but the various office apps still ask for activation on start. So the command line seems not enough for Office 2016. I’ve had 5 chats with microsoft support and the only thing they managed to say is to reinstall my windows 10. By the way the programs seemed to be fully activated before the windows 10 creators update. Now word excel and the others ask again for an activation without success. I’ve also issued the “cscript ospp.vbs /rearm” command, but it gives me the infamous 0x80070005 (access denied) error.

    1. I’ve actually run into this myself and am debating writing an article about it. It’s relatively simple to fix but obviously getting it automated across the network is the best way to go about it. You need to delete two registry keys. Seems they don’t get removed like they are supposed to when you activate office 2016. They are under HK_LocalMachine\Software\Microsoft\Office\16.0\Common\OEM and HK_LocalMachine\Software\WO6432Node\Microsoft\Office\16.0\Common\OEM. Delete that whole OEM key under both places and that window will go away. I’ve had some limited success with automatically deleting that key as the user logs in but you need to log in as an admin account first. It’s weird. As you said the program says it’s activated but it keeps asking you to activate or buy. Totally defeats the purpose of volume licensing.

      I found this fix on Microsoft’s site. I’m not sure why MS would tell you to reinstall Windows 10 to fix it.

Leave a Reply