I get this code 0xC004C008 RRS feed

  • Question

  • Friend, I have the same doubt as you.
    How can I capture the value shown to me in the same way?

    when executing the slmgr / ato command
    I get this code 0xC004C008
    I would like to get that value in a string variable
    Thursday, January 2, 2020 1:30 PM

All replies

  • Hello and welcome to the forums,

    Tip, never assume we know what you are attempting to do and the context either. What you have posted means we must ask these questions so please be very specific else more questions will be needed thus prolonging a solution.

    Is this what you are attempting per say ?

    private void tryingActivateWindows()
        Process activateScript = new Process();
        activateScript.StartInfo.FileName = @"cscript";
        activateScript.StartInfo.WorkingDirectory = @"C:\Windows\System32\"; 
        activateScript.StartInfo.Arguments = "//B //Nologo slmgr.vbs -ato";
        activateScript.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    profile for Karen Payne on Stack Exchange

    Thursday, January 2, 2020 2:20 PM
  • Hi maikelj,

    Thank you for posting here.

    "0xC004C008" means the activation server determined that the specified product key could not be used.

    Possible cause is the KMS key has exceeded its activation limit. A KMS host key can be activated up to 10 times on up to six different computers.

    Resolve Windows activation error codes.

    And I have some questions want to confirm:

    1. What type of application are you using?

    2. What is the main function of your program? Do you want to get error messages?

    If possible, please describe your problem in more detail or provide some code that can reproduce the problem for us to test.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Friday, January 3, 2020 8:05 AM