Windows 10: CMD Activation of new Win 10 Install.

  1.    04 Jul 2017 #1

    CMD Activation of new Win 10 Install.


    Hi All,

    I build/Image/HDD to SSD Upgrad lots of new PCs.
    And a lot of the time I need to get the Key from CMD - wmic path softwarelicensingservice get OA3xOriginalProductKey. And then Activate Windows.

    And I was wondering, How can I use the output from { wmic path softwarelicensingservice get OA3xOriginalProductKey } in a .BAT file to activate windows.

    I need to Automate the Setup prosses after Windows is installed.

    Thank you in advance.
      My ComputerSystem Spec

  2.    05 Jul 2017 #2

    Hard to answer as this would depend on what version you are using, how you are upgrading, what type of licence you have etc.
      My ComputerSystem Spec

  3.   My ComputerSystem Spec

  4.   My ComputerSystem Spec

  5.    06 Jul 2017 #5

    I don't know what the commands would be to capture the product key into a variable. But let's say the product key is captured into the variable %prodkey%. The next commands to install the product key and activate Windows (and it would have to be connected to the internet) would be:

    slmgr /ipk %prodkey%
    slmgr /ato

    Then you would need a command to click on the dialog box that appears:

    Click image for larger version. 

Name:	Capture.JPG 
Views:	2 
Size:	53.1 KB 
ID:	142697
      My ComputerSystem Spec

  6.    06 Jul 2017 #6

    LeonCoertze said: View Post
    Hi All,

    I build/Image/HDD to SSD Upgrad lots of new PCs.
    And a lot of the time I need to get the Key from CMD - wmic path softwarelicensingservice get OA3xOriginalProductKey. And then Activate Windows.

    And I was wondering, How can I use the output from { wmic path softwarelicensingservice get OA3xOriginalProductKey } in a .BAT file to activate windows.

    I need to Automate the Setup prosses after Windows is installed.

    Thank you in advance.
    Why need a script? does setup not auto select the OEM key and seamlessly install and activate it?

    I can do a PShell (only Batman does .bat) script... if need be.
    NavyLCDR said: View Post
    I don't know what the commands would be to capture the product key into a variable. But let's say the product key is captured into the variable %prodkey%. The next commands to install the product key and activate Windows (and it would have to be connected to the internet) would be:

    slmgr /ipk %prodkey%
    slmgr /ato

    Then you would need a command to click on the dialog box that appears:

    Click image for larger version. 

Name:	Capture.JPG 
Views:	2 
Size:	53.1 KB 
ID:	142697
    To run them silently.. prefix those commans with "cscript"
      My ComputerSystem Spec

  7.    06 Jul 2017 #7

    NavyLCDR / cereberus - Thank you for your Help... I will work on the variable %prodkey%, and "auto" text box thing....

    Superfly - Thank you aswell, Sometimes it won't Activate by its own. The reson it is a .bat is that the Laptops are for customers and i don't want to install PShell and all its dependents on the laptop. But thank you for you offer to make a Script..

    I will run over everything later today, once again thank you all for the help so far. The poeple on formes are AWSOME!!!!!! Thank you for helping out People with less PC know how.... You are superheroes
      My ComputerSystem Spec


 

Related Threads
Solved Install win 10 without activation in Windows Updates and Activation
Hi all, A while back on this BBS I read about installing windows 10 without activating it because you want to give your computer away and want the new owner to activate and put in all the setting that they want. can some one post me the link to...
Solved Clean install fails activation in Installation and Upgrade
I have a HP desktop with W-7 that the HD is failing. (Almost failed) I can't do a clone or a system image. I installed a new HD and booted from my latest USB Upgrade from the Windows Media Creation tool. I skipped the activation as it...
Activation query after clean install in Windows Updates and Activation
A friend's Asus 8.1 laptop was stuck in an automatic repair loop so I suggested that he upgrade to Windows 10. Because he was unable to access his system, I opted for a clean install and I created a bootable Win 10 usb on another pc. I used this...
No activation after clean install in Windows Updates and Activation
I upgraded Windows 8.1 Pro to Windows 10 Pro. All went well and it showed as activated. Today I did a clean install and all went well. However, after clean install it shows it is not activated and they want money for a key. What is going on?
Hello, I took part in the free upgrade offer from 7 and used the media creation tool to upgrade (probably should have waited for the upgrade notification but meh), It worked my windows 10 is activated but, I noticed that it wasn't a clean install...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 05:55.
Find Us