[Batch] aslic

Discussion in 'Scripting' started by djpc47@gmail.com, May 21, 2011.

  1. djpc47@gmail.com

    djpc47@gmail.com MDL Novice

    Nov 19, 2009
    30
    4
    0
    #1 djpc47@gmail.com, May 21, 2011
    Last edited by a moderator: Nov 6, 2011
    Aslic(Auto Slic)

    Aslic is a batch script I've been working on for some time that attempts automate key + cert insertion on computers that have slic enabled bios's.... My reason for creating aslic is to simplify activation without having to use closed source alternatives.....

    Aslic was inspired in part by "Vista and Windows 7 Ultimate Certificate and serial installer" by 911medic

    *** aslic may still require further testing, use at your own risk(should work fine though:)) ***

    http://www.mediafire.com/?kv53gh1b0zv0evz <<< Current Version Link(includes iasl.exe, keylist, certs)

    http://forums.mydigitallife.net/threads/26948-Batch-aslic?p=468584&viewfull=1#post468584 <<< current version info

    What This Does:

    - Detects OS
    - Detects OEM (via ACPICA)
    - Parses/searches key list
    - Searches folders for cert
    - Applies info
    - Verifies Activation
    - if activation fails try alt cert if avail and retry

    What This Doesn't do:

    - generate its own valid keys, certificates(keys and cert must be provided/available for it to work)
    - mod your bios with slic
    - acts as a bootloader/crack/other
    - Get you free beer(maybe in the future version)


    Other Useful info:

    www.acpica.org --- program used to dump oem info from bios(iasl.exe)

    http://forums.mydigitallife.net/threads/10370-Windows-7-OEM-SLP-Key-Collection --- 7 oem slp keys

    http://forums.mydigitallife.net/threads/2581-Vista-OEM-SLP-keys --- Vista oem slp keys

    http://forums.mydigitallife.net/threads/2827-Server-2008-Server-2008-R2-OEM-SLP-Keys --- Server oem slp keys

    http://forums.mydigitallife.net/threads/5952-Win-7-amp-Server-08-R2-SLIC-2.1-Bin-Collection --- Win7/2k8r2 (2.1 Certs)

    http://forums.mydigitallife.net/threads/5900-Vista-OEMSLP-Certificate-amp-Bin-Collection --- Vista/2k8 (2.0 Certs)






    -----------------------------------------------------------------------------------------------------------------------------------

    things to still accomplish(OLD/Outdated):
    - scan through folder looking for cert associated with oem+slic version (Accomplished)
    - compatibility test with/for 2k8/2k8r2/Vista Business/Win All "E" edition (In the works still)
    - possibly detect actual slic version instead of guestimate (tips welcome; I think iasl can get this info, but don't know what I'm looking for yet) (Abandoned, activation detection suffices)
    - minor glitch's and code optimization/clean up???

    at this point it detects things and spits out the info

    hxxp://uploading.com/files/m5e7a218/aslic_prev.rar/
     
  2. djpc47@gmail.com

    djpc47@gmail.com MDL Novice

    Nov 19, 2009
    30
    4
    0
    #2 djpc47@gmail.com, Jun 5, 2011
    Last edited: Jun 9, 2011
    (OP)
    Update:

    - I think I figured a simple way to verify activation occurred; means in the future hopefully the script knows when it was successful (assuming cert/key are avail)... ;)

    - current known issues(fun friday material):
    --- 2k8/2k8r2(ect) support is wacked out
    --- crap is relying to heavily on os_list.txt for my liking


    --------------------------------------------------------------------

    link: hxxp://uploading.com/files/a8mab921/aslic_prev2.rar/

    things start getting interesting:smokecowboy:

    I've tested on my laptop(hp dv2000, win7, slic2.1), seemed to work and I'll fix it up more laters...

    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :::
    :::aslic(autoslic script) preview 2(alpha????)!
    :::
    :::
    :::USE AT OWN RISK
    :::
    :::
    :::This script is meant to autodetect
    :::
    :::-Windows Version
    :::-OEM
    :::-Parse a text file containing keys
    :::-find a cert inside its folder
    :::-slic version is assumed(dunno where its located yet)
    :::
    :::and then apply things
    :::
    :::
    :::*** This version is still a work in progress ***
    :::
    :::At this point it display the info for
    :::
    :::- Windows Version
    :::- OEM
    :::- Assumed slic version
    :::- key
    :::- cert file location
    :::and can now start to apply the info
    :::
    :::what is yet to be done,
    :::
    :::- basic testing
    :::- attain some feedback
    :::- code cleanup/optimization
    :::- I want to try using EditionID(registry) as it will save a few seconds but is low priority
    :::
    :::what has been done since last update
    :::
    :::- further testing of :Detos (now detects vista/7 all (e/n/regular), 2k8(ent/datacenter/Standard))
    :::- info.rar contains dumps systeminfo, EditionID (registry) from all tested versions
    :::- :cert (grabs cert directory!)
    :::- :apply (apply junk!)
    :::- I don't remember????
    :::
    :::
    :::
    :::
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
     
  3. djpc47@gmail.com

    djpc47@gmail.com MDL Novice

    Nov 19, 2009
    30
    4
    0
    #3 djpc47@gmail.com, Jun 13, 2011
    Last edited by a moderator: Nov 6, 2011
    (OP)
    Aslic Alpha3/Beta1???:p

    Link: http://uploading.com/files/e8f4fc2e/aslic_alpha3.rar/

    Tested on 2k8 and 2k8r2 standard/enterprise; should work on Vista/7 All versions(unless I threw off compatibility somewhere down the line), should be quite usable.... plz start reporting any issues/ideas/random junk

    Notable Features:
    - now uses registry instead of 'systeminfo' (speeds things up by a few seconds)
    - activation detection(based off Product ID change)
    - if activate doesn't happen with 2.0 cert, attempts 2nd time with 2.1 cert
    - random key(randomly selects a key if oem specific key is not found
    - starting of an error log generation junk

    Known Issues:
    - random key(if no key found stays in random key loop)

    Random Ideas For Future Feats.:
    - timeout for random key:p
    - cert blacklist(feat to make the script try all target oem's certs till it finds one that works else error out)
    - UAC window pop up junk(get UAC window to pop up the when elevation required; not really to worried.... there's threads with vbs method which I'll probably use )
    - anything else that is still applicable from last posts
     
  4. djpc47@gmail.com

    djpc47@gmail.com MDL Novice

    Nov 19, 2009
    30
    4
    0
    #4 djpc47@gmail.com, Jun 19, 2011
    Last edited: Jun 19, 2011
    (OP)
    http://uploading.com/files/8346f47c/aslic_alpha4.rar/

    - tested on vmware using vista/win7 all, 2k8,2k8 r2 all with dell bios

    - small business/storage/foundation server and related obscure versions are not yet supported(with time pending on availability):p

    Notable Changes:
    - re-write of sections that pull keys from the lists(detkey, rkey); its now possible to use key lists that are directly copy and pasted from threads(with only few changes)..
    - no more infinite looping when there isn't a key available for the current OS version

    key list guidelines:

    - 7_list.txt has to have a space added inbetween "75009---"
    - Server_list.txt has to have any "None found" sections removed
    - any lines containing partial keys or otherwise unneeded info can be removed
    and in some cases should be removed
    - only lines actually needed are lines containing title of OS version(S)
    and lines containing full keys/oem
    **(if no keys are available do not include the version in list)**

    ---------------------------------------------------------------------------------------------------------------------

    Thank You Too:)
     
  5. djpc47@gmail.com

    djpc47@gmail.com MDL Novice

    Nov 19, 2009
    30
    4
    0
    alpha 5 -

    http://www.mediafire.com/?kv53gh1b0zv0evz


    - untested(should work; don't think the changes would throw anything off)

    Notable Changes:
    - re-write of sections that locates cert file; now tries all available certs located for the target machine's slic versions folder
    - change over to different slic archive/folder structure for 2.0 certs???

    Future Changes
    - next version should hopefully introduce a optional custom .vbs(concept already proven :) ) as to suppress user prompts when cert/key changes occurs and introduce actual activation detection
     
  6. Josh Cell

    Josh Cell MDL Developer

    Jan 8, 2011
    3,519
    7,112
    120
    Cool...

    Thanks for it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. racky29

    racky29 MDL Senior Member

    Aug 2, 2007
    285
    91
    10
    hello

    im a novice at batch scripts, but ive noticed something in Aslic_alpha_3 and alpha_5 -aslic.bat that to me dont look right
    under Detect Build Section, there maybe an extra SET Command, as there is 2 set commands on the first section,
    highlighted in red here
    so just wandering if this is an error ?
    or is it intentional, and supposed to be there ?
    or dont it matter ?

    ::Detect build
    :DetBuild
    VER | FINDSTR /L "6.0." > NUL
    IF %ERRORLEVEL% EQU 0 set (
    set slic=2.0
    )

    VER | FINDSTR /L "6.1." > NUL
    IF %ERRORLEVEL% EQU 0 (
    set slic=2.1
    )
     
  8. djpc47@gmail.com

    djpc47@gmail.com MDL Novice

    Nov 19, 2009
    30
    4
    0
    #8 djpc47@gmail.com, Nov 2, 2011
    Last edited: Nov 2, 2011
    (OP)
    thnx for pointing it out, I can almost guaranty it was something I added by mistake(I'll take it out next release)... I'm no pro at batch scripting either;P... on a side note I will say that lots of batch related stuff does seem to have quite a bit of optional extra crap that can be added(maybe for ???legacy reasons???,might be why this still works)... Other then that there's a couple of things I did in other sections just because "it happened to be the only way I could get it to work" with little understanding as to why it worked(stuff I hope to clean up and optimize some year; skimming the script now, it was worse earlier in;P)...
     
  9. racky29

    racky29 MDL Senior Member

    Aug 2, 2007
    285
    91
    10
    #9 racky29, Nov 4, 2011
    Last edited by a moderator: Apr 20, 2017
    i like this script, its very clever, well done
    it seems to be working ok
    but the machine im using to look at it,
    is a Fully Activated Retail msdn licence, Win7 Ultimate x64 sp1, with No Slic Bios
    gigabyte motherboard

    so i cant test its proper function
    but i was wandering why it dont mention that my system is activated already
    i think it just needs to detect that im activated and report it
    and probably ask if i want to stop or carry on ect..

    ive, re enabled the omited Pause commands, to slow it down so i could see what it was saying and doing

    and i stopped the commands from entering the key/cert
    so not to kill my activation
    :::slmgr.vbs -ipk %key%
    :::slmgr.vbs -ilc %cert%

    this is the output i got anyway

    Code:
    oem is: "GBT"
    
     os is: "7"
    vers is: "Ultimate"
    Press any key to continue . . .
    
    vers after adaption is "Ultimate"
    
    Press any key to continue . . .
    

    Code:
       *** Random Key Select ***
    
     no key available for GIGABYTE
     random key will be selected
    
     *This may take a few minutes
    FJGCP-4DFJD-GJY49-VJBQ7-HYRR2
    Press any key to continue . . .
    
    The system cannot find the file C:\Users\Paul\Desktop\aslic_alpha5\certbl.txt.
    "C:\Users\Paul\Desktop\aslic_alpha5\SLIC 2.1 BINS\GIGABYTE\2.1 Bin & 2.1 Certifi
    cate\~Certificate~\GIGABYTE-GBT-2.1.XRM-MS"
    Press any key to continue . . .
    

    Code:
    Autodetect Has Resulted in the following:
    
    OS version is 7 Ultimate
    oem is GIGABYTE
    slic is assumed 2.1
    the key to be used is FJGCP-4DFJD-GJY49-VJBQ7-HYRR2
    
    the cert to be used is:
    
    "C:\Users\Paul\Desktop\aslic_alpha5\SLIC 2.1 BINS\GIGABYTE\2.1 Bin & 2.1 Certifi
    cate\~Certificate~\GIGABYTE-GBT-2.1.XRM-MS"
    
    continueing will attempt to apply this info
    
    ******************************************
    *** this has not yet been fully tested ***
    ***          use at own risk           ***
    ******************************************
    
    Press any key to continue . . .
    

    Code:
    ECHO is off.
    Press any key to continue . . .
    
    
    working cert not found for specific system "GIGABYTE"
    
    continueing will exit
    
    Press any key to continue . . .
    
    
    And Exit is Perfomed and it Closes...
    
    oh and what's the reskit folder for
    does it need to be there
     
  10. djpc47@gmail.com

    djpc47@gmail.com MDL Novice

    Nov 19, 2009
    30
    4
    0
    #10 djpc47@gmail.com, Nov 6, 2011
    Last edited: Nov 7, 2011
    (OP)
    racky29,

    first off thnx for showing interest in the script... this will be my best attempt at addressing as much as I can....

    if your just wanting to toy with the script get vmware + VMware Workstation (Multi-Brand) Bios Installer (http://forums.mydigitallife.net/threads/11152-VMware-Workstation-(Multi-Brand)-Bios-Installer)

    about activation detection, it doesn't really detect activation yet(was/am planning to hopefully modify slmgr.vbs to do that; since I dunno anythng really about vbs I am slowly just cutting out code and hopefully trying to isolate what is needed)...

    how the current "activation detection" works - I discovered that when the computer was activated the ProductId changed.... so I got the script to save the ProductID before and after activation was attempted then compared the 2 results to "detect" activation

    when I got that working, since I didn't really have a method to find out the actual slic version on the bios(if you have vista its automatically assumed 2.0, if you have 7 its assumed 2.1) I figured may as well get it to try both 2.0 and 2.1 certs since it would improve the odds of activation(example: vista on a computer that has slic2.1 and the 2.0 cert doesn't work)

    as for reskit, its just a folder containing bits of code and other stuff that I toyed with and or used (no its not required for the script to function), figured I may as well include it just in case anyone else wanted to add to this(may or may not help them)

    examples of what is in reskit:

    oem_res.txt - list of oems and what their name appears as when detect by the script before it goes through oem override

    info or info.rar - info dumped from systeminfo(using the different table styles) and a quick script to get the idea of what it looks like to aslic (without having to install the os again on vm and booting it)

    **quick note for info/info.rar I ended up getting the info from the registry since it was faster then using systeminfo ; don't recall if the resulting info is 100% the same