Activate Microsoft Office 2010 with Batch Script

Follow the instructions below to activate Microsoft Office 2010 with a small batch script. This can be useful for large deployment and scripting environments where you might be playing with sysprep or not able to activate Office using KMS server because you don’t have it.

Activate Microsoft Office 2010

Step 1

Create a batch file. In my example, I named mine act_office.bat.


Step 2

Copy the following code into your file, replacing ***KEY*** with your license key.

slmgr -ipk ***KEY***
slmgr -ato
cscript “C:\Program Files\Microsoft Office\Office14\OSPP.VBS” /inpkey:***KEY***
cscript “C:\Program Files (x86)\Microsoft Office\Office14\OSPP.VBS” /inpkey:***KEY***


You may also like:

Install Canon ScanGear Tool This is a short guide to setting up the Canon ScanGear Tool to enable the Canon copiers to be able to scan directly from the copy machine to the compu...
Automatically Accept Meeting Requests in Microsoft... Follow the instructions below to automatically accept meeting requests and remove canceled meetings. There are instructions for both Microsoft Outlook...
Migrate email to Office 365 using WHM If you are like me, then you are simply wanting to migrate your email over to Microsoft Office 365 to take advantage of Exchange. Me and my colleague ...
Deleted items folder is unavailable I noticed that my IMAP account was having issues with my upgrade from Microsoft Outlook 2007 to Microsoft Outlook 2010. I was trying to delete emails ...
Run only scripts that you trust. (Powershell) If you are like me you have probably run into the following error when trying to run powershell scripts. This becomes very annoying and tedious if you...
  • Jeff Burke

    The above method fails with an error 0xC004F050 when it does ipk. Then when it does ato, I get a notice that Windows 7 was activated (instead of Office). Oddly, if I enter the key and activate the normal way (through appwiz.cpl, go to Office, then click Change, then Add a Key), that same key will be accepted and activated just fine.

    Is this method attempting to apply and activate an Office key for Windows?

    • Jeff Burke

      Found the fix. I did this instead (/act will attempt a KMS activation, then fail if you don’t have a KMS server, and then will attempt a MAK activation).

      cscript “C:Program FilesMicrosoft OfficeOffice14OSPP.VBS” /inpkey:***KEY***
      cscript “C:Program FilesMicrosoft OfficeOffice14OSPP.VBS” /act

      • Mr J.

        tried this..still didn’t work. every time I bring up Offc 2010 it still asks to change product key

  • Eric Berkbigler

    I am using your guide to setting up images via waik and sysprep (to a wds server for image-handling and storage), and need a method to include in the creation of the unattend.xml file the steps to have office 2010 standard activated.

    If you have this posted somewhere, I apologize, but so far I’ve not been able to find it in the few short minutes I’ve performed a search on the web. 🙁