CMD Activation of new Win 10 Install.


  1. Posts : 3
    Win 10
       #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 Computer


  2. Posts : 15,491
    Windows10
       #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 Computer

  3.   My Computer


  4. Posts : 15,491
    Windows10
       #4
      My Computer


  5. Posts : 18,432
    Windows 11 Pro
       #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:

    CMD Activation of new Win 10 Install.-capture.jpg
      My Computer


  6. Posts : 3,453
       #6

    LeonCoertze said:
    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:
    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:

    CMD Activation of new Win 10 Install.-capture.jpg
    To run them silently.. prefix those commans with "cscript"
      My Computer


  7. Posts : 3
    Win 10
    Thread Starter
       #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 Computer


 

  Related Discussions
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 11:45.
Find Us




Windows 10 Forums