Windows 8 KMS Activation

Discussion in 'Windows 8' started by The_Spider, Aug 6, 2012.

Thread Status:
Not open for further replies.
  1. rrohela

    rrohela MDL Expert

    Sep 1, 2009
    1,610
    1,409
    60
  2. Bornung1

    Bornung1 MDL Member

    Oct 9, 2010
    148
    39
    10
    @pisthai

    I need this one: All supported x86-based versions of Windows 7

    Cheers
    and thanks

    @rrohela
    Many thanks :) just what i needed.
     
  3. naseap

    naseap MDL Senior Member

    Jul 25, 2009
    489
    123
    10
    This script works great in Win8 to up the count but after it is done I noticed that my ssp service remains stopped. I have to manually restart it. Shouldn't it restart when it is done.



    REM Increment KMS to 25 so it starts activating clients
    REM save as a bat file.
    REM Windows 8 Enterprise/pro inbuilt KMS Client key used in this one.
    setLocal EnableDelayedExpansion
    set /p X=how many time do you want to run
    :loop
    set /a N+=1
    if !N! gtr !X! goto :eof
    echo your task goes here
    taskkill /im sppsvc.exe /f
    net stop sppsvc /y
    net stop sppsvc /y
    net stop sppsvc /y
    del C:\Windows\System32\spp\store\tokens.dat /q
    del C:\Windows\System32\spp\store\tokens.dat.bak /q
    attrib -H C:\Windows\System32\spp\store\data.dat
    del C:\Windows\System32\spp\store\data.dat /q
    del C:\Windows\System32\spp\store\cache\cache.dat /q
    rem net start sppsvc /y
    cscript %systemroot%\system32\slmgr.vbs -ipk GVLKKEY
    cscript %systemroot%\system32\slmgr.vbs /ckms
    cscript %systemroot%\system32\slmgr.vbs /skms kms.yourdomain.com
    cscript %systemroot%\system32\slmgr.vbs /ato
    goto :loop
     
  4. rrohela

    rrohela MDL Expert

    Sep 1, 2009
    1,610
    1,409
    60
    Remove rem for later use( to run once a day)
    For first use to increase count form 0 to 25 use it as it is.
     
  5. naseap

    naseap MDL Senior Member

    Jul 25, 2009
    489
    123
    10
    Thanks, works great. I need to learn some more.
     
  6. FreeStyler

    FreeStyler MDL Guru

    Jun 23, 2007
    3,566
    3,874
    120
    Why do you think VM packages are distributed? So you can activate online?
    The key no longer can be used to activate against MS servers, it is blocked now
     
  7. Chris123NT

    Chris123NT MDL Expert

    Oct 23, 2010
    1,070
    793
    60
    Some people are a bit dense
     
  8. lunar21

    lunar21 MDL Addicted

    Dec 14, 2008
    753
    270
    30
    When you mean "Remove rem for later use and for first use" do you mean on first time of running it, remove this rem and run it, then afterwords (ie once a day running), just keep it on, or what do you mean?

     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. rrohela

    rrohela MDL Expert

    Sep 1, 2009
    1,610
    1,409
    60
    I mean to say when you have to attain count up to 25 to start activating clients(First time), use script with rem
    For later use or once a day, remove rem.

    Hope its clear now....:confused:
     
  10. sjaak327

    sjaak327 MDL Novice

    Aug 7, 2012
    18
    6
    0
    You could simply remove the line and paste it below the :Loop bit and then remove the rem, this way it will simply start the service once instead of multiple times. Why anyone would run the script daily is beyond me, surely ony running it at the moment you need to re-active the os again (after 180 days) would be more than sufficient.
     
  11. Nucleus

    Nucleus MDL Guru

    Aug 4, 2009
    2,867
    2,950
    90
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. sjaak327

    sjaak327 MDL Novice

    Aug 7, 2012
    18
    6
    0
    Normally no, but then again, normally someone running a kms server does not need a script to maintain the count, as they would have at least 25 clients, either servers or workstations. In this case we are talking about people at home, who might have only a few machines, in which case maintaining the count does not make sense.
     
  13. rrohela

    rrohela MDL Expert

    Sep 1, 2009
    1,610
    1,409
    60
    Replying again coz i found that system stooping SPPSVC service itself & kicks it again when required. So not to worry if its stopped.
    You can check it by starting this service & recheck after some time.
     
  14. rrohela

    rrohela MDL Expert

    Sep 1, 2009
    1,610
    1,409
    60
    weather you have few or 1000 machines. you have to maintain count else after 30 days count will starts dropping below threshold of 25.

    Its up to you change it the way it works best for you. FYI most of time taskkill /im sppsvc.exe /f don't work but using it just for safer side. I am using net stop sppsvc /y three times in script coz sometime service don't stop with single attempt. o_O
     
  15. lunar21

    lunar21 MDL Addicted

    Dec 14, 2008
    753
    270
    30
    So each time this script runs, it makes the KMS server thinks it is a new PC? If so that is a very nice find but if someone could explain how it does this as I want to learn how it does :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. rrohela

    rrohela MDL Expert

    Sep 1, 2009
    1,610
    1,409
    60
    You can learn it manually.
    Stop service sppsvc
    Go to C:\Windows\System32\spp\store & delete files
    go to C:\Windows\System32\spp\store\cache & delete files
    Start service
    Run command prompt run slmgr /dlv & check PC info under Settings for activation.

    Compare result & congratulations:clapping: you learned that what script is doing?

    Its deleting Key & PC ID used for activation. Don't ask me why not to use slmgr /upk
     
  17. lunar21

    lunar21 MDL Addicted

    Dec 14, 2008
    753
    270
    30
    #3497 lunar21, Oct 19, 2012
    Last edited by a moderator: Apr 20, 2017
    Thank you good sir. I just tested mine and it is working 100% (changed some code to make it look like this)

    Code:
    REM Increment KMS to 25 so it starts activating clients 
    REM save as a bat file.
    REM Windows 8 Enterprise/pro inbuilt KMS Client key used in this one.
    setLocal EnableDelayedExpansion
    set /p X=how many time do you want to run
    :loop
    set /a N+=1
    if !N! gtr !X! goto :netstart
    echo your task goes here
    taskkill /im sppsvc.exe /f
    net stop sppsvc /y
    net stop sppsvc /y
    net stop sppsvc /y
    del C:\Windows\System32\spp\store\tokens.dat /q
    del C:\Windows\System32\spp\store\tokens.dat.bak /q
    attrib -H C:\Windows\System32\spp\store\data.dat
    del C:\Windows\System32\spp\store\data.dat /q
    del C:\Windows\System32\spp\store\cache\cache.dat /q
    cscript %systemroot%\system32\slmgr.vbs -ipk GVLKKEY
    cscript %systemroot%\system32\slmgr.vbs /ckms
    cscript %systemroot%\system32\slmgr.vbs /skms kms.yourdomain.com
    cscript %systemroot%\system32\slmgr.vbs /ato
    goto :loop
    :netstart
    net start sppsvc /y
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. sjaak327

    sjaak327 MDL Novice

    Aug 7, 2012
    18
    6
    0
    Actually it does not matter the count dropping under 25, as the script will bring it up to 25 in one run through. I am using a kms with server 2012 key for two months now, and I only bring it up when needed and then simply run the script to get it up to 25 again.
     
  19. rrohela

    rrohela MDL Expert

    Sep 1, 2009
    1,610
    1,409
    60
    #3499 rrohela, Oct 19, 2012
    Last edited by a moderator: Apr 20, 2017
  20. FreeStyler

    FreeStyler MDL Guru

    Jun 23, 2007
    3,566
    3,874
    120
    I like to be able to activate every system out of the box, as i have a Hyper-V server running 24/7 it is much easier for me to run one client VM daily (completely automatic) on that same Hyper-V server that maintains the client count on the KMS Host then to have to manually push the client count whenever I attach a new system to the network