Systems Deployment Question

Windows 10 Scripted Install Retain OEM Key

11/29/2016 3505 views
Hello All,

I have successfully created a scripted install that deploys Windows 10 and various applications to my companies workstations using the K2000. However, the newest batch of computers that we have purchased come with Windows 10 preinstalled. I am wondering how to alter my scripted install to use the already activated Windows 10 OEM key instead of using our volume license.

Thanks in advance
Answer Summary:
1 Comment   [ + ] Show comment


  • If the pre-installed Windows 10 is already activated just install the same version without a key. At first connection the newly installed Windows 10 will automatic be activated again based on the hardware "id" that is captured at the first activation.

Answer Chosen by the Author

The solution to my problem came by entering wmic path SoftwareLicensingService get OA3xOriginalProductKey into cmd of the soon to be imaged computer. This outputted the OEM key which could then be plugged in manually to deployed machine.
Answered 12/02/2016 by: jmiller99
White Belt

All Answers

I've created a small script to set the "OA3xOriginalProductKey"
to the current windows key at os deployment.

UEFI must be activated to use this VBS.
Reboot after run

' SetOEMKey.vbs

on error resume next

dim OEMKey
strComputer = "." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 
Set colItems = objWMIService.ExecQuery( _
    "SELECT * FROM SoftwareLicensingService",,48) 
For Each objItem in colItems 
OEMKey = objItem.OA3xOriginalProductKey

IF OEMKey="" then
'No UEFI OEM Key found or UEFI is disabled
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run """C:\Windows\System32\cscript.exe"" C:\Windows\System32\slmgr.vbs -ipk """ & OEMKey , 1, True
Set objShell = Nothing
end if

Answered 02/22/2017 by: therealredzac
Senior Yellow Belt

This content is currently hidden from public view.
Reason: Determined to be spam through moderation For more information, visit our FAQ's.
I pretty sure you will need to change the WIM and the VLK media has a diff SKU. You will need to use consumer media Pro or Home, but this edition will be unable to connect to a domain.

To activate, just install with the generic licence key (for home or pro) - you can google that, once the machine is online, it will just grab its digital licence from the mothership (Microsoft).
Answered 11/30/2016 by: rileyz
Red Belt

  • Thank you for your response. The OEM key that shipped with the computer was for Windows 10 Pro. I am not sure that using the consumer based media would be the correct solution.
    • Oh you can join 10 Pro to a domain, my bad.

      Hummm, you could try and change the product key after install?


      So after image, change the key to the above, this is a default Win Pro key - the system should try and activate to grab its digital entitlement (OEM key) and activate correctly.

      Im just not sure if you WIM will work, as mentioned, your image uses a VLK key which is Enterprise media (diff SKU) and the Pro that came with the laptop is a non-enterprise.

      Give it a shot i say! All you can do really. Hopefully the key swap will do the the job and im proven wrong on the media front (:
This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.
I agree with rileyz, you will need to use win 10 pro to use the built in key, you can download that version from the MS-VLSC and use that version for the scripted install.  You may have to link your MS Account with the digital license prior to imaging.  This will allow you to re-activate that license on that machine.

Answered 11/30/2016 by: SMal.tmcc
Red Belt

  • windows 10 key here: TGP3J-N7B4K-6K632-YMXHV-X766T from vanskeys.
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ