Topic: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

License:http://i.creativecommons.org/l/by-sa/3.0/88x31.png
Except otherwise noted, the open-source code of the DP_Install_Tool.cmd file is © 2011-2013 by Erik Hansen for DriverPacks.net, under a Creative Commons Attribution-ShareAlike license: http://creativecommons.org/licenses/by-sa/3.0/.
7-Zip is open source software by Igor Pavlov. Most of the source code is under the GNU LGPL license. The unRAR code is under a mixed license: GNU LGPL + unRAR restrictions. Check license information here: http://www.7-zip.org/license.txt or http://www.gnu.org/licenses/lgpl.html
DPInst.exe is proprietary code owned completely by Microsoft and distributed under their own license. (see .\bin\*\dpinst-license.rtf)

Here is a script developed from the original SAD script.  I'll call it SAD2 smile
It'll automatically determine the running system OS arch and extract the correct DriverPacks from the right directory.  Very slick.
It will then install or upgrade the drivers on all your devices from the supplied drivers and clean up after itself.
Supports all NT5 (XP/2000/2003) & NT6 (Vista/Win7/Server2008) OS types.

To get this working in Win7 during an unattended install do the following "setupcomplete.cmd" method.
Create the following folder structure to your Win7 disc:
{Win7-Disc source folder}\sources\$oem$\$1\D\SAD3 (entire SAD3 folder with all DriverPacks goes here)
{Win7-Disc source folder}\sources\$oem$\$$\Setup\scripts\setupcomplete.cmd
Add the following code to the setupcomplete.cmd file.

@echo off
START %systemdrive%\D\SAD2\DP_Install_Tool.cmd /s

If you want to try the current work in progress, it's here:
Download Current version: v130825
Download v130627
Download v120520 (Self-Extracting Archive)
Download v120326 (Self-Extracting Archive)
Download v120317 (Self-Extracting Archive)
Download v120215 (Self-Extracting Archive)
Download v120203 (Self-Extracting Archive)
Download v111118
Download v111009
Download v111008
Download v110505
Download v110504
Download v110503
Download v110502
Download v110501
Download v110312
Download v110213
Download v101203
Read the "readme.txt"


Changelog:

v130825 v3.0 (Erik Hansen)
Added Win8.1 final build number (9600) to detection array.

v130627 v3.0 (Erik Hansen)
Added 7zip switch -aoa to enable auto-overwrite mode.
Removed Win8 leaked build numbers and added Win8.1 preview build number to detection array.
Added DIR to CDROM detection array to prevent errors with card readers in system

v120520 (Erik Hansen)
Modified code to detect OS Architecture correctly.
Removed extra parenthesis and other minor refinements.

v120423
Fixed code to detect Server 2003 correctly. (franner)

v120326
Fixed code to prevent errors during cleanup stage (Iceblackice)

v120318
Added code to enable switches.  Only a Help guide and "Silent" operation for now. (Erik Hansen)

v120317
Added code for silent operation.  No prompts, displays progress only. (Erik Hansen)
Added code to delete folders not needed. (Erik Hansen)

v120217
Updated command line 7-zip in \bin folder to 9.22. (Erik Hansen)

v120215 (Erik Hansen)
Added command line 7-zip to \bin folder and code to use. 
Updated elevate.vbs to current version from MSDN.
Optimized OS detection subroutines.
Fixed log file output reference to %windir%\dpinst.log.

v120203 (Erik Hansen)
Added code to use native installed 7-Zip if present.
Fixed bug with extra space in %ARCH% variable

v111118
Fixed typo in log file output reference. (Twig123/Dave)

v111009
Fixed typo in KTD option code. (Erik Hansen)

v111008
Added code to allow user to change Keep The Drivers (KTD) option (Erik Hansen)
Fixed bug where DriverPacks wouldn't be found if there were spaces in the path.
 
v110713
Fixed code to prevent errors during cleanup stage (Erik Hansen)
Added code to report accurate CPU type (Erik Hansen)
Added code to detect DP_*.7z files in the current directory (Erik Hansen)

v110505
Fixed code to prevent writing log to read-only disc 
Repackaged dpinst* files to prevent accidental deletion. 

v110504
Fixed bug where NT6 Method 1 fails prematurely. 

v110503
Fixed code to remove extra backslash from path if exist. 

v110502
Fixed un7zip code to allow for wildcard file extraction

v110501
Updated to support UNC network shares and UAC elevation for NT6
Fixed CPU detection to allow for 32-bit OS on 64-bit CPU
Fixed un7zip code to allow breakpoints

v110312
Fixed missing NT5\x86\dpinst.* files
Updated to current DriverPack Chipset versions.

v110213
Added NT6 Method 1 functionality.
Added check for UNC (\\server\path\to\file) paths.  Cmd.exe will fail if UNC path is used.
Changed Method 1 COPY function to XCOPY for reliability.
Improved readme.txt instructions.

v101203 
Added NT6 functionality (Vista/Win7).

**Moved from original thread**
http://forum.driverpacks.net/viewtopic.php?id=4954

*DPinst.exe is owned by Microsoft and distributed under their own license included with the Microsoft Driver SDK.
7-Zip components are distributed under the LGPL license.
*un7zip.exe was donated to the DriverPacks project by users  STK and Maxximum

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

there have been so many times i wanted to pin a medal on you... and here we are again big_smile

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Thanks for your work much appreciated, seems the best way to add driver packs to WIn7, especially as my Win7 SP1 DVDs are unlocked for all versions, using Sevenlite to install the drivers is a right pain as you need to update each version, which is very long winded. smile

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Yes, that was my point for writing it in the first place...I'm lazy! big_smile

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

WOW really cool tool.. I just loaded it up and ran it on a Latitude E5410 running WIN7 x64 and it did update a few drivers but didn't update the

; **    Filename:  iaAHCI.INF
; **    Revision:  Version 10.5.0.1026
; **    Date:      4/26/2011
; **    Abstract:  Windows* INF File for Intel(R) Rapid Storage Technology Driver

I had to do it manually...

Here is some info from the log and the hwids:

INFO:   Found driver package: 'C:\D\x64\M\Intel\1\iaAHCI.inf'.
INFO:   Found driver package: 'C:\D\x64\M\Intel\2\iaAHCI.inf'.

INFO:   Preinstalling 'c:\d\x64\m\intel\1\iaahci.inf' ...
INFO:   ENTER:  DriverPackagePreinstallW
INFO:   Driver package is already preinstalled 'c:\d\x64\m\intel\1\iaahci.inf'.
SUCCESS:c:\d\x64\m\intel\1\iaahci.inf is preinstalled.


INFO:   Preinstalling 'c:\d\x64\m\intel\2\iaahci.inf' ...
INFO:   ENTER:  DriverPackagePreinstallW
INFO:   Looking for Model Section [INTEL_HDC.ntamd64]...
INFO:   RETURN: DriverPackagePreinstallW  (0xE0000242)

WARNING:DRIVER_PACKAGE_LEGACY_MODE flag set but not supported on Plug and Play driver on VISTA. Flag will be ignored.
INFO:   Looking for Model Section [INTEL_HDC.ntamd64]...
INFO:   RETURN: DriverPackageInstallW  (0x103)
INFO:   Did not install 'c:\d\x64\m\intel\1\iaahci.inf' because it is not better than the current drivers.


============
RAID Devices
============
PCI\VEN_8086&DEV_3B29&SUBSYS_04291028&REV_05\3&11583659&0&FA
    Name: Intel(R) 5 Series 4 Port SATA AHCI Controller
    Hardware ID's:
        PCI\VEN_8086&DEV_3B29&SUBSYS_04291028&REV_05
        PCI\VEN_8086&DEV_3B29&SUBSYS_04291028
        PCI\VEN_8086&DEV_3B29&CC_010601
        PCI\VEN_8086&DEV_3B29&CC_0106
    Compatible ID's:
        PCI\VEN_8086&DEV_3B29&REV_05
        PCI\VEN_8086&DEV_3B29
        PCI\VEN_8086&CC_010601
        PCI\VEN_8086&CC_0106
        PCI\VEN_8086
        PCI\CC_010601
        PCI\CC_0106

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

When running this in Windows 7 using method 1, are the drivers copied somewhere inside C:\Windows ? Can we delete all the SAD stuff & driverpacks uncompressed in nt6 ?

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

The drivers that are needed by the target system are copied many places depending on each .inf.
The only time you should delete the SAD folder is if you copied everything to the target drive or you don't need it anymore.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Ok, so if I understand correctly, when SAD is used, only the drivers needed by the system are integrated, not everything. So for example, after running SAD on system A, if I sysprep and deploy the image on system B, I would need to run SAD again, otherwise there could be unrecognized devices. Is that correct?

Last edited by jcharaoui (2011-08-23 02:45:00)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Yes, it only updates the drivers for the hardware on the target machine at the time the utility is run.  If you change hardware, you'll have an "unknown hardware" listed.

SAD2 could be scripted as part of RunOnce prior to imaging/deployment.  Then it would run on first boot after imaging.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Hi. I just tried using your 110505 version on a Windows 7 x86 machine. I had it configured to run in my unattend.xml post install scripts. When it gets to the end, it says it cannot delete the D directory because a file is in use. I'm using method 2. This is the error:

The process cannot access the file because it is being used by another process.
This window will close itself in 30 seconds.

Thanks!

Last edited by bla4free (2011-09-03 08:25:46)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Yes, this is a known problem.  The script can't delete the C:\D directory while the script is running.  Very annoying.
I'll probably add a runonce registry edit to delete it on the next reboot instead.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Having a problem with SAD2. I extract the archive, 110505 version and run the CMD script. Since there's an example file in there it should just run off the bat, right? But I get an error from un7zip of "No files to extract" then "Invalid files list and". Even if I add more DriverPacks inside the NT5\x86 directory, I still get the same error messages.

I was able to create a directory using DPBASE and run the CMD file it created, but it looked different than SAD2. I'm assuming it was SAD1? The .7z files were all renamed too, makes it difficult to replace with a newer version in the future. What am I doing wrong?

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Ahh, okay, figured it out. There's a bug in the script? Missing some quotes.

The line:
for %%f in (%DPLoc%\DP_*.7z)

Should have some quotes:
for %%f in ("%DPLoc%\DP_*.7z")

Now a directory path can have spaces. smile

Last edited by Mr.Tom (2011-09-28 07:10:53)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Hmmm, that should work.  I ran into the "spaces" bug yesterday while testing new KTD functionality but I didn't have time to pursue it further.
Thanks.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Any mirrors, megafire not working today.. ;-( , .torrent isnt' worth in case of daily updates nearly of SAD2 . or ?

regards

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Works for me, just tested.
Please try again.

In any case, I sent you an email with the latest package!

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Funny works now too ;-)

regards

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Version 11.10.08 in first post.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

minor typos in the 'readme', perhaps?

NT6\x64\
-Method-1: Extract the contents of all DriverPacks to the NT6\x64\D\ folder so that the folder heirarchy looks like this: \NT5\x64\D\*.  Method 1 will fail if the \NT6\x64\ folder contains any .7z DriverPacks.
-Method-2: 64-bit Vista/Win7 DriverPacks go here in their compressed state.  The Chipset DriverPack is included for reference.  Method 2 will fail if the \NT6\x64\D\ folder exists here, only .7z packs must be present.

NT6\x86\
-Method-1: Extract the contents of all DriverPacks to the NT6\x86\D\ folder so that the folder heirarchy looks like this: \NT5\x86\D\*.  Method 1 will fail if the \NT6\x86\ folder contains any .7z DriverPacks.
-Method-2: 32-bit Vista/Win7 DriverPacks go here in their compressed state.  The Chipset DriverPack is included for reference.  Method 2 will fail if the \NT6\x86\D\ folder exists here, only .7z packs must be present.

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

LOL, fail! big_smile
It's meant to say NT6 not NT5.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Updated first post to v111009

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

@mr_smartepants

I tried your SetupComplete.cmd code you provided in your last SAD2 thread on my Vista Install USB


@echo off
for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\sources\install.wim set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%
::Begin SAD2 install

echo Stand Alone Driver Installer
IF EXIST %CDROM%\SAD2\DP_Install_Tool.cmd call %CDROM%\SAD2\DP_Install_Tool.cmd
exit


and I cannot seem to get it to work properly, in fact, all it does is sit there at a blank screen with a cursor in the middle. Its not frozen, the cursor does move, but nothing happens. No command prompt, no windows, nothing. I have my SAD2 folder at the root of my USB drive, just as you would have it set up on your CD or DVD.

I was also wondering if there was a way to easily unattend the installation, so that when it does finally come up, I do not have to type y or n for KTD or anything else. Should I just use your 110505 version to accomplish this?

Last edited by DrRodneyMcKay (2011-11-09 09:33:54)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

To make it unattended, delete this line (162):
set /p option=[Y,N]?

To be honest, I've never tried to have SAD2 spawned during setupcomplete.cmd.  I'm not sure it would work because the "admin test" tries to write a nul file to the user-space which hasn't been created yet at that point.

You could try changing
IF EXIST %CDROM%\SAD2\DP_Install_Tool.cmd call %CDROM%\SAD2\DP_Install_Tool.cmd
to
IF EXIST %CDROM%\SAD2\DP_Install_Tool.cmd start %CDROM%\SAD2\DP_Install_Tool.cmd

I'll do some tests if I have time this weekend.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

To be honest, I've never tried to have SAD2 spawned during setupcomplete.cmd.  I'm not sure it would work because the "admin test" tries to write a nul file to the user-space which hasn't been created yet at that point.

You could try changing
IF EXIST %CDROM%\SAD2\DP_Install_Tool.cmd call %CDROM%\SAD2\DP_Install_Tool.cmd
to
IF EXIST %CDROM%\SAD2\DP_Install_Tool.cmd start %CDROM%\SAD2\DP_Install_Tool.cmd

Thanks, I will try that.


"To make it unattended, delete this line (162):
set /p option=[Y,N]?"

I actually removed that and the KTD options and it seem to work for normal use. The reason why I am trying to make this unattended as possible is because I run a shop and Vista happens to be the one OS that I most commonly install and unfortunately, its the worst and most time consuming one as well. I have managed to Sysprep all the latest updates, which saves several hours by itself, but I want to be able to at least connect to the network so that I can immediately start my Ninite, Anti-virus and optional updates without having to manually install the drivers first. Makes a big difference when you are doing 5-10 installs at once.

Thanks

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Well, I just wanted to confirm that changing the "call" command to "start" did the trick. I also removed all instances of KTD since I don't need it and added a shutdown -f -r command at the end to automatically restart and finish all the driver installations.

So far, I have a full Windows Vista installation with all the latest drivers and updates down to about 1.5 hrs.

Last edited by DrRodneyMcKay (2011-11-10 09:46:44)