Access denied (0xC0000022) when trying to activate Windows with slmgr.vbs -ato


When attempting to active a Windows 2008 server with slmgr, you get the following error message:

C:\Windows\system32>cscript slmgr.vbs -ato
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Windows\system32\slmgr.vbs(2007, 5) (null): 0xC0000022

In addition to that, every time the "Software Licensing" service starts, you may get the following message:
"An unauthorized change was made to Windows
You will no longer receive notifications, including those about your license or activation. Use the link below to find out how to fix your system.

Error: 0xC0000022
{Access Denied}
A process has requested access to an object, but has not granted those access rights."


Both errors (0xC0000022) are "Access Denied" errors.

Make sure the service is running as a "Network Service" account and that you have administrative access (local admin) especially if you try to activate a remote machine.

If you changed the account the service is running with, restart the service and it should be fixed.

Affected software:

Microsoft Windows 2008
Microsoft Windows 2008 R2
Microsoft Windows Vista


Comment #1 from Aston [Username: Guest] at 13/05/2011 22:28
thanks for this article.This was very useful.
I was having a lot of issue due to this and was unable to figure out the cause.
Comment #2 from Soo [Username: Guest] at 17/11/2012 06:52
Thank you!
Comment #3 from None [Username: Guest] at 08/03/2013 04:42
This solution has corrected my Windows Activation error. I thank you very much!
Comment #4 from Suresh S [Username: Guest] at 13/12/2013 07:43
Thank you very much. My issue got resolved. Once again thank you very much.
Comment #5 from Sumit [Username: Guest] at 23/01/2014 04:43
Thank you very much, really helpful, sorted my issue. Again thanks a lot.
Comment #6 from Mike [Username: Guest] at 20/05/2014 03:14
Your post was the solution for me. However it was not clear to me what "service" you were referring to. I eventually tracked it down to the "Software Protection Service" and made your recommended changes and the issue is sorted. Many thanks for pointing the way.

Add new comment
Anti-Bots verification code (just write 1234):