#### Topic: Windows 7 x86 & x64 Stand Alone Driverpack utility

I understand there is no Base for Windows 7 (or Vista)

I tried using the DP_Install_Tool.cmd to be told the platform is not yet supported!

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

Here is a script developed from the original SAD script.  I'll call it SAD2
It'll automatically determine the running system OS arch and extract the correct DriverPacks from the right directory.  Very slick.
Supports all NT5 (XP/2000/2003) & NT6 (Vista/Win7) OS types.
*To-do:
Get DriverPacks Finisher working in NT6.

If you want to try the current work in progress, it's here: http://forum.driverpacks.net/viewtopic.php?id=5336
Older releases:

**This post is obsolete**

Changelog:
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 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 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.

v101203

Last edited by mr_smartepants (2011-05-02 08:02:02)

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

pnputil -a <path>\*.inf

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

Ooh, nice tip Rick.  Does that work in both Vista & Win7?

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

Yes, according to this article KB937793 it was first introduced in Vista

Last edited by ricktendo64 (2010-11-30 04:50:34)

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

Stickied!

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!

The DriverPacks, the DP_Base program, and Support Forum are FREE!.

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

I am about to do a fresh install so I decided to give it a go, here is the error I get, I think its a un7zip problem

BTW I see you are not using pnputil

Last edited by ricktendo64 (2010-12-01 03:20:19)

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

I haven't had a chance to play with the pnputil yet.  This was just a variation on the current SAD script.
I'll make it better!
The error is from the script trying to delete itself (I think), but nothing to worry about.  The only thing left behind is an empty \D\ directory.

Hmm, I'll need to play with pnputil more.

>pnputil -?
Microsoft PnP Utility
Usage:
------
pnputil.exe [-f | -i] [ -? | -a | -d | -e ] <INF name>
Examples:
pnputil.exe -a a:\usbcam\USBCAM.INF      -> Add package specified by USBCAM.INF
pnputil.exe -a c:\drivers\*.inf          -> Add all packages in c:\drivers\
pnputil.exe -i -a a:\usbcam\USBCAM.INF   -> Add and install driver package
pnputil.exe -e                           -> Enumerate all 3rd party packages
pnputil.exe -d oem0.inf                  -> Delete package oem0.inf
pnputil.exe -f -d oem0.inf               -> Force delete package oem0.inf
pnputil.exe -?                           -> This usage screen

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

I'm rewriting the script to support both NT5 and NT6 installations.  Right now NT5 is disabled in the script but the discriminator code is in place and the NT6 portion is working perfectly.
For now I'm sticking with DPinst because it supports both NT5/NT6.  But once I get a chance to play with PNPutil and can see what it can/can't do I may change my mind.

I'll try to get everything working and uploaded this weekend for testing.
I love getting my hands "dirty" with coding.

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

One bad thing about using pnputil is it will add ALL the drivers to DriverStore, even if the hardware is not present on your PC (Like KTD on steroids)

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

Updated 2nd post with new version.  NT5 & NT6 supported!
*Edit
Uploaded SAD2-101202.7z to fix minor bug in code that would cause dpinst to fail.
Confirmed working in XP, Win7 x86 & x64, and Vista x64

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

I just wanted to say a big "thank you" for this! It is greatly appreciated!

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

You're welcome.
Jeff and I are working on getting this new code added to DriverPacks BASE.  I'm recoding it to maintain existing SAD1 folder structure for legacy purposes.
v101203 in first post.
Enabled Method-1 for NT5.

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

Just wanted to say that this works great!

Out of curiosity... any suggestions on how to incorporate this into a Windows XP HII (hardware independent image).  I'd love for this .cmd to run after sysprep on first login.   Any ideas where to stick the files so that after the command is run and the files extract the base .7z files are deleted?

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

For XP you could have it run during ROE.

@echo off
SET PP=%~dp0
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY%\100 /VE /D "Installing DriverPacks" /f
REG ADD %KEY%\100 /V 1 /D "%PP%\DP_Install_Tool.cmd" /f

I'm assuming you know how ROE works already.

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

Hmm, is there a trick to calling this install from another program or batch file?

During first login our image uses ROE to launch a configuration wizard which we use to specify a configuration file for certain settings and software. The utility was built using autoit. When I called the install tool using this, the CMD window never opened and I couldn't find any sign of it in device manager but our program continued to wait for it. I tried using a bat to exe converter to turn the install tool bat into an EXE but it just flashed the cmd windows on the screen and went away before I could read it. I think it was giving an invalid directory error possibly. I tried doing it with a batch file using the start /wait command to launch dp_install_tool.cmd (using the UNC path) but it just opens a new command prompt window and doesn't do anything else.

The driverpacks.net folder with the dp_install_tool.cmd file is located on a network share (I am using SAD M2). Could this have something to do with it? Do I need to add something in the calling batch file that will map the UNC folder to, say, Q:, change to that drive and run the dp_install_tool.cmd file from there?

I would rather run driverpacks during the configuration wizard phase before our a/v software gets installed (blocks dpsfinishr as being suspicious). Sorry for the long post, just trying to save time and head off possible questions. Any insight that can be provided here would be appreciated.

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

Eh, never mind actually. The more I thought about it, the more sense it made to just do the mapping thing. Here is the batch file I used, if it helps anyone else.

@echo off
net use Q: "\\280npssv6j32vc1\TSS\DriverPacks.net"
PING -n 6 127.0.0.1 >NUL
Q:
start /wait DP_Install_Tool.cmd
net use Q: /delete

edit: Okay, not really a driverpacks issue, but when I went back to check on the machines, I found that the driverpacks install had completed but that the batch file appeared to hang up waiting for net.exe to finish. Not sure why. Caveat emptor to anyone using that code I suppose.

Last edited by avatar28 (2010-12-17 10:59:57)

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

Has anyone had any bugs to report for v101203?  I've made minor tweaks to the code for 101204, but nothing major.

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

mr_smartepants wrote:

Has anyone had any bugs to report for v101203?  I've made minor tweaks to the code for 101204, but nothing major.

Only issues I had was with getting it called from another batch file. I did have to take out the pauses, however. As a suggestion, could it have an unattended switch (/u or something) that would skip the pause screens or else include code that would skip the you need to run as administrator bit when run on Windows XP?

Also, how about the possibility of requesting elevation from within the batch file. Maybe this information will be of use. From what I found, I think you could use "runas /user:Administrator" to launch dpinst and not get prompted. You might could modify dpinst to include a manifest that would cause it to request elevation when launched too.

Also found a couple of programs that can be used to start other things elevated.
http://www.wintellect.com/CS/blogs/jrob … vista.aspx
http://www.ntwind.com/software/utilities/hstart.html

Also found this page which describes a way of determining from within a batch file if it is being run with elevated credentials or not. Could be useful.

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

mr_smartepants wrote:

Has anyone had any bugs to report for v101203?  I've made minor tweaks to the code for 101204, but nothing major.

testing this atm :

>>If you want to try the current work in progress, it's here: http://3rdpartydriverpacks.thesneaky.co … -101203.7z

under Windows7-x86_enterprise , extracted on my D:\ partition , and adding the mass-storage x86 for windows7 too , i get similar "file not found" this time for sndrec32 , problem is always "reproducable" ;-)

EDIT: found the other thread regarding sndrec32 in this forum , they mention the file should be in /system32, well it isnt but this one is there :
SoundRecorder.exe

EDIT2: and after just for fun renaming a copy of SoundRecorder.exe -> sndrec32.exe , the first error is "gone", but ;-) finally the sndrec32.exe getting executed and popping up . whats going on here?

EDIT3: ok im fool ;-) , while i cleanup'ed my system a few weeks ago i deleted those un-needed .wav files from /media , therefore the sndrec32 stuff could be kept away from the .cmd file , s othe file "beep.wav" not getting played" sorry guys! ;-)

so what!? <- well nevermind, ;-)

not sure what's going on there, never tried SAD before . any ideas how to activate the log for the SAD in case you're interested on troubleshooting?

regards
ben

Last edited by raummusik (2011-01-03 22:16:38)

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

mr_smartepants wrote:

With my limited free time, I'll see what I can come up with.  No promises or timelines though.

Here is a script developed from the original SAD script.  I'll call it SAD2
It'll automatically determine the running system OS arch and extract the correct DriverPacks from the right directory.  Very slick.
Supports all NT5 (XP/2000/2003) & NT6 (Vista/Win7) OS types.

If you want to try the current work in progress, it's here: http://3rdpartydriverpacks.thesneaky.co … -101203.7z

**I'll try to update this post with each new revision**

hello

while i playing around with SAD , well you should take care of the %system%/D  Folder, so if one has accidentally "local" some /D  Folder with files/folders in it , your .CMD script deletes everytihng in it after finishing . i took some folder/files and put pro-active in /D folder , all the files were deleted. it would be nice to pre-select some temporary folder for the extraction or some yes/no decision script checking first for content of /D folder and if there's content it asks what to do

know what i mean? sure i think ;-)

regards
ben

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

Having the beep.wav play is a leftover from the original SAD code.  I never liked it, and since it's causing problems, I may remove it.

Having the files extract to the \D\ folder was standard procedure for the DriverPacks in the first place and been like that for years.  Although I could rework the code to extract to %systemdrive%\DriverPacks\D\ instead.  Would that help?

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

you cant change the folder or the finisher will fail...

End users will have to select a folder other than \D for their stuff if they don't want it deleted with the DriverPacks. We have been using %SystemRoot%\D for almost ten years. This is a LONG established procedure / location. The DriverPacks have always been an unattended solution... adding a user input dialoge is contrary to our goal "unattended" IE no user input. It will be much easier for an end user to select an alternate folder than for us to rewrite the DriverPacks Finisher and DriverPacks BASE and SAD.

Alternate solution 1 is to set the DPsRootDel  = "false" flag. Note:The DriverPacks will not be removed.
Alternate solution 2 is to use SAD with Method 1 (either compressed or extracted) This will install the DriverPacks from an alternate location... Again the DriverPacks will not be deleted or copied. This is an excellent solution for network or USB SAD locations.

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!

The DriverPacks, the DP_Base program, and Support Forum are FREE!.

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

Thank you all once again, I still don't often reload Win V/7 but I did get it partly (good enough) to work when that script in post 2 appeared, Has it been changed in the life of the post??

Even on XP the DriverPacks Finisher has been broken for a while (prolly my fault)

Last edited by David McMahon (2011-01-22 16:15:07)

#### Re: Windows 7 x86 & x64 Stand Alone Driverpack utility

David McMahon wrote:

... when that script in post 2 appeared, Has it been changed in the life of the post??

I put the version number in the script.  As of now, the current version is v101203.