Hey all! Just looking for a little it of help with this code in SetupComplete. Basically Im trying to integrate MultiOEM and Loader together. So if MultiOEM cant activate using SLIC then Loader will. I found some code donkeys ago but never had a SLIC2.1 BIOS to try it on until I recently modded a couple of mine. This is what I had and which doesn't work: Code: :ACTIVATE cscript //nologo %windir%\system32\slmgr.vbs | Find /i "Licensed" if %errorlevel% EQU 0 goto :FIRSTLOGON :Windows Loader "Windows Loader.exe" /silent /preactivate :FIRSTLOGON move /y "%WINDIR%\Setup\Scripts\FirstLogon.cmd" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\FirstLogon.cmd" I suck at code so am stuck My PCs on W7 are non-UEFI so I only use Loader or certs but if its possible to also add in something like PicoKMS to the script so it checks all possible activation methods that would be awesome! This is the last thing I need to do before putting my W7 disc to bed Many thanks for any help! ;edit; Gonna mark this as solved now, check posts 29 & 30 for the findings
EN-US I think or EN-GB I usually use GB but when doing testing Im just slamming the Next button so probably US!
It's english is the important fact, since you check for 'Licensed' and SLMGR output is localized. Afaik the Loader is already part of the MultiOEM, better ask TheGuardian in his thread.
Coolio, I didn't know/think that loader was part of it but then again I have very little knowledge of the activation side of things, still getting my head round it all
Saw you asked there already ... i'm commitedly not absolutely sure it's a part of the pack, but thought it . If not, come back and we'll see further.
The part I think is failing is the code inbetween that checks if its activated or not by MEOM. MEOM on its own activates Windows Loader on its own activates Windows FirstLogOn works fine basically it should be something like: Check if MOEM has activated using certs if it has then skip Loader and goto FirstLogOn If MOEM hasnt activated then run Loader Its just that little bit inbetween to check which one to use I did also try this as well which i cobbled together from Google but still Loader kicks in. Code: cscript /nologo %windir%\\system32\slmgr.vbs /xpr | findstr /i /c:" will expire "> NUL 2>&1 if [%errorlevel%]==[0] (GOTO :WINDOWSLOADER) else (GOTO :FIRSTLOGON)
Btw, i would simply spare the check, i'm not aware of any chance the system could already be activated at this time . We talk about Win 7 right?
(Should mention Im not activated on this machine at the moment) Ive just tried: Code: C:\Users\Dude>cscript /nologo %windir%\\system32\slmgr.vbs /xpr | findstr /i /c:" grace period "> c:\xpr.txt Searching for "grace period" instead (of licensed) just to get an output and get the result in xpr.txt of Code: Initial grace period ends 10/08/2015 10:49:20 So the command seems to be working within Windows but that could be different during SetupComplete though. Im currently upgrading to 10RTM on my laptop (test machine) but once its done Ill try without the // and just a single / instead.
Yeah this is for Win7. Getting ready for 10 so thought Id finnally get my 7 stuff sorted and put to bed. It was my understanding that MEOM runs at OOBE before SetupComplete. The cert and theme are installed and the theme can be seen during the user input of the OOBE stuff (Username, password etc) and at that point it was activated. Then SetupComplete runs and ideally checks to see if it is activated and if it isnt runs loader. Or do the certs get inputted during SetupComplete and all Im doing is overwriting it with Loader? A lot of this is me just seeing if it can be done TBH. I have several machines that all have different activation methods and Im trying to get it all together in one iso. Ive managed to get everything else together like silent installs and tweaks all installed silently etc, this would just be the icing on the cake
try this: Code: :ACTIVATE cscript "%windir%\system32\slmgr.vbs" /dlv | findstr /i /c:" Licensed " 2>nul&&goto:FIRSTLOGON :Windows Loader "Windows Loader.exe" /silent /preactivate :FIRSTLOGON move /y "%WINDIR%\Setup\Scripts\FirstLogon.cmd" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\FirstLogon.cmd"
Sorry for the tardy reply, test machine still installing 10 so just wiped and tested on main machine. Loader still runs with that. It feels like we are so close, just that tiny bit of code lol Have attached a snap of OEM Query Tool during first stage of OOBE just to cofim that the certs are installed and its all activated etc. Just to double check that it wasnt something conflicting or such.
Hmm ... Code: :ACTIVATE cscript "%windir%\system32\slmgr.vbs" /dlv | findstr "Licensed" 2>nul&&goto:FIRSTLOGON :Windows Loader "Windows Loader.exe" /silent /preactivate :FIRSTLOGON move /y "%WINDIR%\Setup\Scripts\FirstLogon.cmd" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\FirstLogon.cmd"
Problem i see is, i'm not sure about the license status in that very moment, it might be an idea to move this part from setupcomplete to firstlogon stage of the Setup.
Hmmm Ill give this latest one a shot now then might have to have a look at adding it to my firstlogon. If I have to Ill use the 'activation' part as FirstLogOn, reboot to be sure, then silent install apps and cleanup after. Logic is saying it is possible. I found the original code in someone elses SetupComplete back when these 'custom preactivated releases' were common so it seems it may have worked or at least they thought it worked at some point. Off to try the latest change...
You could just have some common certificates in your C:\Windows\System32\OEM folder (MSI, Asus, etc) and just install with Win7 slp key. Windows will choose correct cert & be auto activated. No need for any scripts...