[Q] slmgr.vbs command query

Discussion in 'Scripting' started by QuantumBug, Jul 5, 2015.

  1. QuantumBug

    QuantumBug MDL Developer

    Mar 7, 2012
    1,488
    1,324
    60
    #1 QuantumBug, Jul 5, 2015
    Last edited: Jul 6, 2015
    There is an instruction in slmgr.vbs which is /cpky (clear product key).

    Now am I to understand this just clears the DigitalProductId from the Registry to prevent disclosure attacks or does it remove the activation key completely?

    Also, I posted in the wrong section like an idiot. Can mods please move this to scripting? Thanks to the moderator/admin who moved this.

    Regards, The Dev.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. s1ave77

    s1ave77 MDL Guide Dog/Dev

    Aug 15, 2012
    14,717
    18,995
    340
    #2 s1ave77, Jul 5, 2015
    Last edited by a moderator: Apr 20, 2017
    /cpky only clears it. To uninstall use '/upk [Activation-ID]'.

    Code:
    Microsoft Windows [Version 6.3.9600]
    (c) 2013 Microsoft Corporation. All rights reserved.
    
    C:\Windows\system32>cscript slmgr.vbs /upk c06b6981-d7fd-4a35-b7b4-054742b7af67
    Microsoft (R) Windows Script Host Version 5.8
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Uninstalled product key successfully.
    
    
    C:\Windows\system32>cscript slmgr.vbs /dlv
    Microsoft (R) Windows Script Host Version 5.8
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Software licensing service version: 6.3.9600.16384
    Error: product key not found.
    
    
    C:\Windows\system32>
    Would uninstall a Win8.1 Pro gVLK.


    EDIT::::::::::::::::::::::::::::::::::::

    Interestingly WMIC check and VBS for Keycheck still find Info :g::

    Code:
    =Microsoft(R) Windows Software Licensing Version 6.3.9600.16384=======================
    =Copyright(C) Microsoft Corporation. All rights reserved==============================
        Name | Arch.: Windows 8.1 Pro | x64
     License Channel: Windows(R) Operating System  VOLUME_MAK channel
             Edition: Windows(R)  APPXLOB-Client add-on for EmbeddedIndustry EmbeddedIndust
    ryA EmbeddedIndustryE EmbeddedIndustryEEval EmbeddedIndustryEval CoreARM ProfessionalN
    Professional ProfessionalWMC EnterpriseN EnterpriseNEval Enterprise EnterpriseEval
       Current Build: 6.3.9600.16384
          BuildLabEx: 6.3.9600.16384
              SKU-ID: ec67814b-30e6-4a50-bf7b-d55daf729d1e
         Product Key: GCRJD-8NW9H-F2CDX-CCM8D-9D6T9
      License Status: 0 = < UNLICENSED >
         Graceperiod: 0 mins = 0 hrs = 0 / 180 days
              Rearms: 1000
       KMS Host ePID: (empty)
     KMS Host Adress: (empty) Port:(empty)
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. QuantumBug

    QuantumBug MDL Developer

    Mar 7, 2012
    1,488
    1,324
    60
    'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion' is the usual location for the encrypted key (DigitalProductId), but it also exists in a sub-folder called 'DefaultProductKey'.

    Maybe it's because Windows is not activated also.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...