This bat script is written by me to mass install drivers, activate OEM Windows as well as perform Disk Optimization to alleviate some of the repetitive actions.
You are free to use as you wish but no warranty is provided.
You just need to put the bat script in the same folder as the drivers and OEM Certificate and launch it with Administrative Permission as shown in the example below.
You will most likely need to make some minor changes to suit the script to your purpose.
REM indicates comments.
Start Copy below after this line:
REM Script Originally Written by the Author of aspiregemstone.blogspot.com
REM You are free to modify, share & use, completely Free of Charge.
REM But kindly please acknowledge the source in the Spirit Of Sharing. Thanks =)
FOR /D %%I IN (%0) DO CD /d %%~dpI
echo Creating OEM Certificate Directory...
echo Copying OEM Certificate...
copy "OEM.XRM-MS" "C:\Windows\system32\OEM"
echo Activating Windows 7...
echo Please wait...This might take a while...
REM Rename the OEM Certificate to OEM.XRM-MS
slmgr.vbs -ilc C:\Windows\System32\OEM\OEM.XRM-MS
REM Replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with the OEM Key
slmgr -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
echo Installing Drivers...
echo DO NOT RESTART THE COMPUTER!
REM Rename the Driver Packages
REM Below is how the script access extracted Drivers
echo All DRIVERS INSTALLED!
echo Cleaning up TEMP Folders
REM Remove Temp Folders created by HP and Intel Driver Packages
del /S /Q /F C:\SWsetup
del /S /Q /F C:\swsetup
del /S /Q /F C:\Intel
REM Manually invoke optimization
echo You may restart the Computer now!
Save the script as Setup.bat and Right Click to launch it with Admin Rights.