Topic: CAB compress Windows 7 Drivers

Hello,

In the past I've used the Dps_base to create a CAB compressed directory of drivers for Windows XP.  I would like to do the same for Windows 7/Vista in order to save space.  I have given SAD3 a try but from what I can see it does not offer a cab compression option for the entire driver directory like DPs_Base did, only the 7zip option or completely uncompressed (but maybe I am missing something).

Is there a recommended method of doing this?

I suppose I could use makecab.exe and do a recursive loop through my driver directories on specific files, renaming the last extension character to an _;  at least thats what I've observed Dps_Base did with XP drivers.  Would this method work with Windows 7?

Thanks in advance!

Re: CAB compress Windows 7 Drivers

given the size and price and speed of current media and networking, cab compressing files became unneeded. This is the first time this topic has come up for any NT6 OS.

ten years ago a few hundred meg would make the difference of fitting on a 700MB disc.
Or bog down a 10 Mb switch.

You could emulate the DriverPacks BASE method one the way you suggest, and i don't know if it will work for sure but it should.

Why do you wish to do this, i can't imagine?

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: CAB compress Windows 7 Drivers

Well I'd like to fit all the current driverpacks on a DVD-R, currently the 64-bit drivers are a little over 5GB.  This is to be used on random computers that are missing drivers here and there.  I'm not interested in running dpinst.exe to update everything, as I've had problems in the past with it using incorrect video drivers that I couldn't roll back, and eventually just had to reinstall the OS.

I will see if I can run a recursive makecab, hopefully that will work.  Otherwise I guess I can just go dual layer.

Re: CAB compress Windows 7 Drivers

just try a driver you know you can test first (you have driver and device in hand).

manually cab that driver and test to see if it even works before investing more time in it big_smile.

Let us know how that works. I must warn you that some of the newer video drivers will not appreciate this.  and they are some of the biggest drivers.

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: CAB compress Windows 7 Drivers

Here is my first try at a script.  It works well except for a couple issues.

First, it only appends an _ on the extension instead of replacing the 3rd character.  I don't know if this will affect the drivers' installation.

Second, there are about 350 files that it is compressing twice, and appending two _'s on the extension.  Not sure why this is happening...

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION

CD /D "%~dp0"

FOR /R %%X IN (*.dll, *.sys, *.cfg, *.cpl, *.din, *.icm, *.forms, *.oem, *.pop, *.pnf, *.resources, *.rtf, *.rom, *.tvp, *.rfx, *.tip, *.vp, *.htm, *.html, *.reg, *.txt, *.cap, *.dat, *.xml, *.drv, *.lib, *.js, *.lrc, *.man, *.mof, *.mui, *.nvi, *.chm, *.hlp, *.blb, *.eng, *.dan, *.deu, *.nld, *.dut, *.esp, *.fra, *.ger, *.ita, *.jpn, *.kor, *.por, *.spa, *.swe) DO MAKECAB "%%X" "%%X_"& DEL /F /Q "%%X"

ENDLOCAL

The space saved is substantial.  The original directory size was 5.11 GB, and after compression it has shrunk to 3.7 GB, which is actually much better than I anticipated.

Re: CAB compress Windows 7 Drivers

OverFlow wrote:

just try a driver you know you can test first (you have driver and device in hand).

manually cab that driver and test to see if it even works before investing more time in it big_smile.

Let us know how that works. I must warn you that some of the newer video drivers will not appreciate this.  and they are some of the biggest drivers.

I will try this on a fresh install later tonight to see if Windows 7 will use the cab'd files.

I guess for the larger video drivers I could just move them to a different directory and skip them.

Re: CAB compress Windows 7 Drivers

Wow this is an excellent idea, this should save me some space in my driverpack

Would be cool if it worked with the driverstore

Last edited by ricktendo64 (2013-11-01 15:44:23)

Re: CAB compress Windows 7 Drivers

um... you can't compress all those files. I can dig up the list out of DriverPacks BASE code to tell which ones i know for sure should not be cabbed.

known exceptions

"_",  "AX", "VP", "CAB", "CAT", "CMD", "INF", "INI", "EXE"

we decided to skin this cat the other way, we cabbed all files except...
the exception list is shorter and easier to maintain, or it was.


If Rick thinks it's a good idea you must be onto something 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: CAB compress Windows 7 Drivers

Nibus, any driver uses machine language, and help files use what's there.

the crux to SIZE is, the HWID really only needs one set..  of all these languages

There were (in the past) WDM files. them are not needed (all in wdm can be safely deleted)

language for help, is not needed (and that alone will save big space)

default language in windooz in amerikaneez ingleez, and you will most likely NOT see EN folder
(you do know that even British English have to get american ingleez out of our language choices?)

the point is, I figure 3.8Gb from your driver collection are not needed at all.

That was the help I can offer you.

Now I need your help

Can you upload for me to download your collection, so I can filter this for drivers you dont even need at all

say where to, i will DL them next thursday
fellow geek

Last edited by Jaak (2013-11-01 17:34:04)

The answer was 42?
Kind regards, Jaak.

Re: CAB compress Windows 7 Drivers

I sound like a noob
hehe

The answer was 42?
Kind regards, Jaak.

Re: CAB compress Windows 7 Drivers

Note to Jeff,
remember when we had to create HWID finder from scratch? The early SED filter I originally used, the russinicof and de microsoft scripting guy tool found less..
Very early on we found HWID that early windows filter (win orig setup) missed, and that got us help from warmsnow (a DriverPacks guru back then)
And so on, and so on.

Our work had kinda eliminated all error driver writers left in by scripting around it, or by culling (pruning) out known conflicting duplicates.

a month later, a new driver for realtek came out, and it had all but two new HWIDS, and a known 7526 conflicts with its OWN legacy drivers.
The problem with driver writers was that they did NOT delete the HWID it was no longer suitable for.

The great job we did was that we had finally figured this out and once we knew what what worked in old and not in new, people like Jeff and Mr Smartepants could script around it.
Finding the culprit duplicates and generics way back when was one step. (I think I can honestly  say I was a great help in that)
Developing software to help filter out them conflicts was not  something I could do.

You know, I came on board by asking a question.
years ater, late 2009 I saw that ideas we'd discussed really got going, and I had a tough time in real life (steelplant issues, health issues)

in 2010 I got in a seriuos accident, and was immobile left side for months. it took 10 month revalidation, and I am still partially invalid.

But my brain started to work again.

The answer was 42?
Kind regards, Jaak.

Re: CAB compress Windows 7 Drivers

WOW! very sorry to hear about your accident Jaak, hope you recover further

I did a pnputil add driver test with compressed .ax_ (.ax) and .ex_ (.exe) and had no problems

BTW try this command, it does not have the renaming problem

for /f %X in ('dir/b *.dll *.exe *.sys') do makecab %X & del /f /q %X

Add more extensions as needed

Last edited by ricktendo64 (2013-11-02 04:52:52)

Re: CAB compress Windows 7 Drivers

And to return the drivers to the original extracted state you could use 7z.exe

for /f %X in ('dir/b *.*_') do 7z e %X & del /f /q %X

Re: CAB compress Windows 7 Drivers

I don't know why those exceptions are there, not all of them anyway.

That is the list i inherited from Wim that is used in DriverPacks BASE tongue

That code is very old and mostly untouched, at least to date.

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: CAB compress Windows 7 Drivers

Jaak wrote:

Nibus, any driver uses machine language, and help files use what's there.

the crux to SIZE is, the HWID really only needs one set..  of all these languages

There were (in the past) WDM files. them are not needed (all in wdm can be safely deleted)

language for help, is not needed (and that alone will save big space)

default language in windooz in amerikaneez ingleez, and you will most likely NOT see EN folder
(you do know that even British English have to get american ingleez out of our language choices?)

the point is, I figure 3.8Gb from your driver collection are not needed at all.

That was the help I can offer you.

Now I need your help

Can you upload for me to download your collection, so I can filter this for drivers you dont even need at all

say where to, i will DL them next thursday
fellow geek


Very interesting, thank you very much for this information.  I actually just downloaded all the Windows 7 x64 DriverPacks from the torrents here:  http://driverpacks.net/driverpacks/latest  and then exracted them all to the same directory.  Turned out to be a little over 5GB.

Maybe even more savings can be had when deleting unneeded files as well as compressing.

ricktendo64 wrote:

BTW try this command, it does not have the renaming problem

for /f %X in ('dir/b *.dll *.exe *.sys') do makecab %X & del /f /q %X

Add more extensions as needed

Fantastic!  I'll give that one a shot on the entire disc. 

I apologize I was unable to test over the weekend, I was out of town.  However I have a few new computer builds I can test these drivers on today or tomorrow, so I will get them all CAB'd up today and on a DVDR for testing.

Thank you all for your help and input!

Re: CAB compress Windows 7 Drivers

Looks like that command won't process recursively.

It can process recursively if we add the "/s" switch to DIR.  However, then it dumps everything in the root directory.

I think I've come up with a script that will process all files recursively, name them correctly, and not process anything twice.  Plus I've added a log with the names of the compressed files.

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

DEL /F /Q "%~dp0makecab.log"

CD /D "%~dp0"

FOR /R %%X IN (*.dll, *.sys, *.rtf, *.htm, *.html, *.reg, *.txt, *.xml, *.man) DO CD /D "%%~dpX"& MAKECAB /V2 "%%X"& DEL /F /Q "%%X"& ECHO %%~dpX%%X>>"%~dp0makecab.log"

ECHO.& ECHO.& ECHO Finished& ECHO.
PAUSE
ENDLOCAL

I kept the file list more conservative this time around until I can test more file types.  Also added level 2 verbosity to makecab.

Before:
http://i.imgur.com/yRki1qE.png

After:
http://i.imgur.com/DXGdNhK.png

Last edited by nibus (2013-11-06 10:52:30)

Re: CAB compress Windows 7 Drivers

you could just name the pack(s) with a valid NT5 name and run BASE on it in SAD mode tongue

then you can see how much space is saved and test that the existing method is also valid for NT6.

and not have to write any code ...   Quick and easy

I'm trying to carve out some time for updating BASE SAD and Finisher soon. if it works with the test above then i can code it fast and easy to just do nt6 packs. i can also add and remove extensions from the list, or add exceptions for specific files / folders.
Jeff

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: CAB compress Windows 7 Drivers

Now that would just be too easy!

Actually it doesn't work, throws errors about extracting the packages.  I assume it's because of the directory names being different.

Re: CAB compress Windows 7 Drivers

Rats... I was trying to make it easy for ya, sorry.

Don't bury yourself in code, keep it simple we just need proof of concept big_smile.

I can do this very easy if it works.



Does it work???

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: CAB compress Windows 7 Drivers

OverFlow wrote:

Rats... I was trying to make it easy for ya, sorry.

Don't bury yourself in code, keep it simple we just need proof of concept big_smile.

I can do this very easy if it works.



Does it work???

I tried it last night on a fresh install on an ASUS P8Z77-V.

It worked on every driver except the video card (NVIDIA GTX 660).  So I think some video drivers may have to be left untouched.

These are the drivers that I remember installed:  Intel USB 3.0 Controller, Asus Wifi-N PCI card, ASmedia Mini-wifi, Intel Gigabit NIC, SMBus, USB 3.0 Extensible, Creative Audigy 2 ZS, and a couple others I can't remember.

I will keep testing it on more machines, but I think it works just fine on drivers that don't require a setup.exe to run.

So maybe if Setup.exe's are excluded it would all work fine?

Re: CAB compress Windows 7 Drivers

It didn't work on the 660 because the official drivers don't have support for the 660.
Check out each subforum for beta packs that have newer driver releases.
The beta driverpacks are larger as they contain more drivers.

Re: CAB compress Windows 7 Drivers

bigfoot wrote:

It didn't work on the 660 because the official drivers don't have support for the 660.
Check out each subforum for beta packs that have newer driver releases.
The beta driverpacks are larger as they contain more drivers.

Ah, Okay.  I'll grab those beta's and try again.  Thanks!

Re: CAB compress Windows 7 Drivers

Please revisit my original advise.

instead of INCLUDE, do EXCLUDE. (not equal to)

and exclude these...  "_",  "AX", "VP", "CAB", "CAT", "CMD", "INF", "INI", "EXE"


The best news is it looks like it works just fine 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: CAB compress Windows 7 Drivers

OverFlow wrote:

Please revisit my original advise.

instead of INCLUDE, do EXCLUDE. (not equal to)

and exclude these...  "_",  "AX", "VP", "CAB", "CAT", "CMD", "INF", "INI", "EXE"

I'm afraid I'm not a programming wizard and only know a little batch...  how would I do this?

Last edited by nibus (2013-11-08 07:54:53)

Re: CAB compress Windows 7 Drivers

I manually cab'd the latest Intel Integrated HD Graphics 4600 series (Haswell) and they installed fine on an HP AIO. 

Also used it on an older Pentium D machine, it installed 3 drivers just fine.

This is after cab'ing all files mentioned in my previous post plus *.ax files.