Topic: the best way to add drivers in windows 7 ?

I have been reading that injecting the drivers via dism increases the size of the image (it is no very important), the problem i have seen, after the system is installed, all the drivers are stored in the folder "C:\Windows\System32\DriverStore\FileRepository" regardless if they are needed or not, so it increases the size of the windows installed.
Also i have been reading that installing drivers from dvd or usb flash media, do the same as it copies all the drivers founded in the path of drivers.
Also i have read that it can add drivers via DPinst TechNet link, so only the drivers needed are copied to the folder DriverStore.

And my question please, what is the best method to add the drivers? i am looking for a method like the windows xp (it does not store all the drivers after the setup is finished)
Thanks

Re: the best way to add drivers in windows 7 ?

I typically only add mass storage to the boot.wim and then chipset, mass storage, LAN, & WLAN to the install.wim for this very reason.  Windows Update will typically download whatever else is needed for that system.  Another option is to create a script to run at first logon to purge the %windir%\system32\driverstore\* directory.
I haven't played with dpinst in Win7 but I'm certain we can tailor our SAD command script to work in both Vista/Win7.

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: the best way to add drivers in windows 7 ?

Drivers are ALWAYS stored in FileRepository, even if you just install them normally, but I see what you mean you dont want to add a GIANT driverpack with a bunch of drivers you dont need...you should just integrate only the drivers for your particular hardware thats what I do

To delete drivers post install from FileRepository its best to use pnputil.exe (included in Win7)

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

First use -e to create a list then -d oem#.inf to delete the ones you dont need

You may have to use -f cmdline on some drivers if they fail to uninstall/delete

Edit: I just thought about it, you can use pnputil post install to install your drivers if you prefer

Last edited by ricktendo64 (2010-07-05 18:18:52)

Re: the best way to add drivers in windows 7 ?

Ooh, nice tip Rick!  I wonder if pnputil can be scripted to do this unattendedly?

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: the best way to add drivers in windows 7 ?

How do you know which drivers you want to delete, there are a lot of them.
i am wondering it they can be deleted automatically, i mean the system selects the drivers he needs for that computer and then delete the others.
Thanks

Re: the best way to add drivers in windows 7 ?

I wonder if -i (install) will work alone without -a (add), this way only the drivers being installed will get added to FileRepository

Major, use a good driver backup tool after you are sure you have all the latest up to date drivers and only integrate those

Last edited by ricktendo64 (2010-07-06 04:51:50)

Re: the best way to add drivers in windows 7 ?

Ooh, nice tip Rick!

yet another Spam attempt has been thwarted

Re: the best way to add drivers in windows 7 ?

the problem lies with windows 7 drivers for the agp subsystem and is not related to your 3d card at all there is a work around for this error. the steps i took in order to have this fixed is the following, this a temporary fix and needs to be done every time you reinstall windows 7 unless somebody can add the drivers to the windows 7 image and let us know how to do this, i am not clued up in manipulating images. 1. download the following from rapid-share or from mega upload . 2. shutdown your pc and remove your 3d card from the PC. 3. restart your system and reinstall windows 7. 4. after install is complete reboot your PC in safe made by pressing f8 repeatedly. 5. extract this files on your harddrive somewhere & run the batch file included in the archive. the batch file will take ownership of your PC & patch the agp & pci.sys files. 6. shutdown your pc & reinstall your 3d card. 7. srart up your pc & install the newest nvidea or ati device drivers for windows 7. that should have a temporary fix for installation issues and remove the bsod at install

Last edited by john watch (2010-09-14 21:32:01)

SPAM!

Re: the best way to add drivers in windows 7 ?

Well, add the drivers in the Windows 7 then follow the below steps:

   1. Insert your CD / DVD drive installation disk. In Explorer, select the file you want to view. Scroll down to the file "set", which is identified as an application.
   2. Right-click the file and select "Properties." Top of the window that appears, click the "Compatibility" tab.
   3. Check "Run this program in compatibility mode as:", and then from the popup menu in the "Windows Vista" the.
   4. Also, check "Run this program as an administrator" in the bottom of the window.
   5. Click "Apply", then "OK."

Spam removed!

Re: the best way to add drivers in windows 7 ?

Hello guys....!
Thank you for you generosity! At this forum, you share us so important message.I like this kind of post which tell us much important massage.thank you again.

SPAM links removed by moderator!

Re: the best way to add drivers in windows 7 ?

Time to revisit this question - how to have a completely unattended *UNIVERSAL* install that has all driver packs available to install but at the end of the day results in the particular PC having only the drivers it needs stored in the filerepository? As in, just like we do so easily with UA XP installs.

Re: the best way to add drivers in windows 7 ?

Well, if you add the drivers to the install.wim with DISM then you're going to have all the drivers remain even after install...significant bloat.
The method I prefer (to minimize the driverstore bloat) is to only integrate dpms & Chipset and use my SAD2 script post-install.  Using dpinst.exe ensures that only the drivers that are needed are installed and the script cleans up after itself.  I'm still planning on getting DriverPacks Finisher to work in an NT6 environment.

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: the best way to add drivers in windows 7 ?

that sounds like an Excellent IDEA... reminder to self... sticky

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: the best way to add drivers in windows 7 ?

mr_smartepants wrote:

Well, if you add the drivers to the install.wim with DISM then you're going to have all the drivers remain even after install...significant bloat.
The method I prefer (to minimize the driverstore bloat) is to only integrate dpms & Chipset and use my SAD2 script post-install.  Using dpinst.exe ensures that only the drivers that are needed are installed and the script cleans up after itself.  I'm still planning on getting DriverPacks Finisher to work in an NT6 environment.

Ok, cool! Before I start here with your SAD2 package - is it ready for testing on 7 x64 installs? Or is DriverPacks Finisher required to get this working?

Re: the best way to add drivers in windows 7 ?

the finisher is not absolutely necessary... it's just a nice upgrade to an already working solution.

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: the best way to add drivers in windows 7 ?

Fragbert wrote:

SAD2 package - is it ready for testing on 7 x64 installs?

Testing?  It's ready for PRODUCTION! smile  I've been using it for months and works great.

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: the best way to add drivers in windows 7 ?

* 1 Determine the manufacturer and model of your hardware, usually listed on the sticker on the hardware, on the hardware box or on the owner's manual. Common hardware manufacturers that make accessories for computers running WIndows 7 are many, but include Microsoft, Logitech, Lexmark and Epson.
         
* 2 Visit the manufacturer's website. Look for a link that says "Customer Service," "Drivers" or "Downloads". Look for the correct driver for ythe exact model of your product and download the driver.
         
* 3 Visit your computer manufacturer's website for drivers for manufacturer components in your computer. For internal hardware that came already installed in a new computer, the computer manufacturer often has special drivers specifically made to use on Windows 7 on your computer.

spam removed

Re: the best way to add drivers in windows 7 ?

* 4 Realize that the manufacturer's driver recommendations will rarely change for years, unless something was seriously buggy.

* 5 Add to that, the fact that every desktop/laptop/server's chips (& many peripherals) are made by manufacturers Other than the OEM of the board.

* 6 Understand that those chip manufacturers are most often the originator of these 'special drivers' & that they often release to many OEM's updated drivers for a wide number of specific HWID's that are contained inside their plastic-encased silicon chippery!

* 7 Look for someone to have already found updated, MS-WHQL'ed drivers from various OEM's, tested them for validity versus actual hardware, collected them in a convenient downloadable form, maybe throw in a kickass custom post-installer like Mr_Smartepants' SAD2 (I don't believe he should be sad, he should be proud lol) & there you are @ DriverPacks.net!  Go get 'em!  cool cool

Last edited by TechDud (2011-08-27 01:17:27)

Re: the best way to add drivers in windows 7 ?

Since this topic is dealing with how to add drivers to win7 i will post my question here:
I want to add Driverpacks to my current installed OS (Windows 7) but i don't want them to be installed in the system so i just copied them to c drive and added their path under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DevicePath".
Now when i used to do this with windows xp the os would cache the HWID's into infcache.1 file in each folder which will speed up search process for next times, but now windows 7 doesn't cache any HWID from any location other than those defined in oemxxx.inf files inside windows inf folder and create one cache file for those under system32\driverstore folder.
I used pnputil but this seems to install the drivers and expand the compressed ones which is not what i want.
So is there any way to use the drivers path and make the os cache the HWID's from the inf files to speed up search process?

Re: the best way to add drivers in windows 7 ?

Hey guys, this is my first post so it might be totally out of line.  I have been working on my own universal images for windows 7 x64 for some time. I recently came across sad2 (very nice work mr smarteepants).

I have tried both the sad2 tool and the method I use which involves pnputil and a forfiles script:
forfiles /p %1 /s /m *.inf /c "cmd /c pnputil -a @Path"

which I found here: http://deploymentbunny.com/2011/05/07/a … -forfiles/

I can't take credit for the script, but what I can take credit for is avoiding sysprep altogether.  Basically when I build the master image to be deployed, I do it in a virtualbox, but the key is I change the IDE/sata controller driver to 'generic' before uploading the final image.  This allows the image to initially boot on almost any system, then since almost all the drivers have been added to the windows driver store, it automatically finds and installs hardware on the first boot, including the specific driver for the controller installed.  I realize this method isn't for everyone, and avoiding sysprep could potentially cause licensing issues, but I do not activate the master image, and my employer has a sitewide win7 enterprise license with domain keyserver, so it hasn't been an issue.  According to a few things I've read, it's no longer necessary to change the sid when joining machines to a windows 2003 or higher domain, and I have not had any issues.  Although, if you do wish to change the sid, (microsoft best practices, when using imaging tools such as ghost) then are tools that allow you to do so.

Anyway, I really like the idea of sad2, but my current method is great for my fit, I would however like a way combine the best of both worlds: to index the .7z driver packs while they are compressed, thereby leaving them in the image, but also allowing the windows driverstore to enumerate them and load drivers dynamically.    This could aid in minimizing bloat, but also keeping the drivers there for universal deployment.

I am currently using clonezilla to deploy which generally works well, but doesn't dynamically resize ntfs partitions on efi systems, and is a bit tricky to usb boot the clonezilla client on a Mac.

We generally deploy on HP hardware, and so far driverspacks picks up about 93%, since newer hardware requires a few downloads here and there, for things like fingerprint readers, intel AMT hardware, usb 3.0 controllers, AMD/ATI integrated video controllers, etc.

Do you guys have any tips/recommendations/alternatives to my current deployment method?

Re: the best way to add drivers in windows 7 ?

Welcome to DriverPacks! smile
I tried using pnputil last year, but it has some serious (IMHO) problems.

Quote taken from here: http://technet.microsoft.com/en-us/libr … 10%29.aspx

Drivers that are located in the path specified by DriverPaths are copied to the driver store ...

So this continues the problem of driverstore bloat.  What I use in my SAD2 script is the Microsoft tool dpinst.exe.  There are two versions (incompatible with each other) for 32 & 64 bit OS.
Where dpinst excels is that it only installs drivers for the hardware that is present during execution.

About 95% of my script deals with OS detection, path resolution, and driverpack extraction. 
The "meat & potatoes" line that gets the drivers loaded is right here:

Start "MicroSoft Driver Installer Tool Running" /wait /separate /realtime /min CMD /C DPInst.exe /c /s

But in order for this to work, dpinst needs to be copied to the root of the folder containing all the drivers.

The batch-script line I was experimenting with for pnputil usage was this:

:: pnputil -a -i %SystemDrive%\D\*\*.inf

But again, this loads ALL the detected drivers into the driverstore.  The drivers remain there, even after first install.  That's a VERY significant file bloat.  Depending on how many DriverPacks you use, that folder may exceed 3 GB in size.

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