KMS-QADhooker for Localhost Self-Activation

Discussion in 'Windows 10' started by xinso, Apr 17, 2014.

  1. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,092
    24,400
    340
    #241 s1ave77, May 18, 2014
    Last edited by a moderator: Apr 20, 2017
    I unpack the MSU to CAB temporarily and add them in an order given by a text file:

    Code:
    :furtherAP5
        set "COUNT="
        set "z="
        for /F "tokens=*" %%G in (%path10%) do set /A z+=1
        for /F "tokens=*" %%G in (%path10%) do (
            cls
            echo:
            SET /A COUNT+=1
            echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
            Echo Adding Package !COUNT! of %z% = %%G
            echo:
            echo ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
            echo:
            echo:
            Dism /Image:"%path5%" /Add-Package /PackagePath:"%TMP%\CABS\%%G.cab"
            echo:
            echo ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
            echo:
            timeout /t 3
        )
    
    
    path10 = path to TXT file, e.g. C:\Update\order.txt
    path5 = path to mount folder

    text file:

    Code:
    Windows8.1-KB2934018-x64
    Windows8.1-KB2959977-x64
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,554
    15,642
    270
    Downloaded ADK tools and guess what :biggrin: it failed again!!!
    I wonder due the fact I am working on a standard user account has something to do with this issue. But I wonder why since I open a cmd prompt as an admin.
     
  3. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,092
    24,400
    340
    After installing Assessment and Deployment Tools there is an Command Prompt for them in Start Screens All Apps View :g:. Open as admin and try from there.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,554
    15,642
    270
    #245 Mr.X, May 18, 2014
    Last edited by a moderator: Apr 20, 2017
  5. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,554
    15,642
    270
    #246 Mr.X, May 19, 2014
    Last edited by a moderator: Apr 20, 2017
    Well, I can't use D: drive because no free space and no sufficient partition size. Could you re-write your code using my paths? Please.
    This would be my last attempt for this thing, I don't know what's going on... :mad::D
     
  6. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,092
    24,400
    340
    #247 s1ave77, May 19, 2014
    Last edited by a moderator: Apr 20, 2017
    Yours:
    Code:
    for %%A in (W:\Upd_x86\KB\*.msu) do (cmd /c "dism /image:W:\win81aio\mount /Add-Package /PackagePath:%%A")
    With adapted pathes:
    Code:
    for %%A in ("W:\Upd_x86\KB\*.msu") do (Dism /Image:"W:\win81aio\mount" /Add-Package /PackagePath:"%%A")
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,554
    15,642
    270
    #248 Mr.X, May 19, 2014
    Last edited by a moderator: Apr 20, 2017
    Thanks mate but no success, it throws the same error.o_O I will do it without loop, just like this:
    Code:
    Dism /Image:W:\win81aio\mount /Add-Package /PackagePath:W:\Upd_x86\
    
    Hopefully all KBs get correctly integrated and no issues arise as murphy78 warns.
     
  8. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,554
    15,642
    270
    xinso, using your code within a cmd file, DOES WORK!!!!! :biggrin:
    I wonder why it doesn't work manually...
    I guess you don't need any link to my msu files anymore as they are in my PC so there's no download links.
     
  9. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,092
    24,400
    340
    @ Mr.X

    BTW: When using for-loop directly in CMD change %%A to %A and it will work even there :cool2:.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,554
    15,642
    270
    @xinso and s1ave77
    Just came back home and wanted to thank you as it seems to be working (the loop command) as long a cmd file is created. If I copy-paste the loop code into the cmd prompt it just don't work for me.
     
  11. oreo27

    oreo27 MDL Member

    Jun 18, 2009
    123
    40
    10
    This is pretty neat. I just tested this on an 8.1 VMWare image and it worked flawlessly. On a side note, I'm completely clueless as to how it goes about activation. My limited knowledge in cmd scripting made my eyes bleed when trying to decipher the scripts. But here's what I've gathered.

    1. It copies KMS-QADhooker.exe and KMS-QADhooker.dll to the %systemroot%.
    2. It somehow activates Windows through the scripts at an emulated? KMS server on a local address? 192.168.1.255.

    Can someone please explain to me what it does exactly? :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. xinso

    xinso MDL Guru

    Mar 5, 2009
    14,021
    14,671
    340
    #254 xinso, May 19, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
  13. oreo27

    oreo27 MDL Member

    Jun 18, 2009
    123
    40
    10
    Honestly, I could only sort of imagine how it activates. It's much more complicated than simply running a KMS server each boot. But on the plus side, it seems a lot more lighter and faster (due to the file size) in addition to its capability to be slipstreamed into an ISO. Thanks for the hard work on the project! :):worthy:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. oreo27

    oreo27 MDL Member

    Jun 18, 2009
    123
    40
    10
    I initially thought that AutoKMS was only ran once during boot
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,092
    24,400
    340
    #257 s1ave77, May 19, 2014
    Last edited by a moderator: Apr 20, 2017
    As said .....when used in a script:

    Code:
    for /R "W:\Upd_x86\KB" %%A in (*.msu) do (dism /image:W:\win81aio\mount /Add-Package /PackagePath:%%A)
    When used in command prompt directly:

    Code:
    for /R "W:\Upd_x86\KB" %A in (*.msu) do (dism /image:W:\win81aio\mount /Add-Package /PackagePath:%A)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,092
    24,400
    340
    #258 s1ave77, May 19, 2014
    Last edited by a moderator: Apr 20, 2017
    Ooooopsie, corrected my post (copy 'n paste fail ) :eek:.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,554
    15,642
    270
    #259 Mr.X, May 19, 2014
    Last edited by a moderator: Apr 20, 2017
    Just one more question because I'm processing my script right now and don't want to stop it, just by taking out just one % then the loop should work directly on a cmd prompt? Is that it? LOL
     
  18. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,092
    24,400
    340
    Yep, inside script it must read %%A and in command prompt it must read %A.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...