On my post-installation task, I have a BAT script (under Windows run-time environment) as

cscript C:\Windows\System32\slmgr.vbs /ipk [license key]
However, after the image is applied and is booted up, I get
We can't activate Windows on this device because you don't have a valid digital license or product key. If you think you do have a valid license or key, select Troubleshoot below. Error code: 0xC004F012
What am doing wrong?

Thank you.

Answer Summary:
1 Comment   [ - ] Hide Comment


  • Do you know if your VAMT has been upgraded to 3.0 or 3.1 yet? Windows 10 activation requires this.
Please log in to comment

Answer Chosen by the Author


After you set the key you also need to perform the activation:
cscript //b c:\windows\system32\slmgr.vbs /ato

Answered 05/15/2017 by: chucksteel
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity


Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja