Thứ Tư, 15 tháng 12, 2010

Script to Install Driver Packages

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:
__________________________________________________________________________________

    @echo off

    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

    cls

    echo Creating OEM Certificate Directory...

    mkdir "C:\Windows\system32\OEM"

    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 Done!

    echo Installing Drivers...

    echo DO NOT RESTART THE COMPUTER!

    REM Rename the Driver Packages

    Chipset_Driver.exe

    Graphics_Driver.exe

    Ethernet_Driver.exe

    Wireless_Driver.exe

    Printer_Driver.exe

    WinTV_Driver.exe

    REM Below is how the script access extracted Drivers

    Audio_Driver\Setup.exe

    Web_Camera\Setup.exe

    Storage_Driver\Setup.exe

    echo All DRIVERS INSTALLED!

    echo Cleaning up TEMP Folders

    C:

    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

    Rundll32.exe advapi32.dll,ProcessIdleTasks

    echo You may restart the Computer now!

    pause
__________________________________________________________________________________

Save the script as Setup.bat and Right Click to launch it with Admin Rights.

Không có nhận xét nào:

Đăng nhận xét