Jump to content

Driver Compressor


Acheron

Recommended Posts

Driver Compressor

Compress drivers to save space on removable media

Program is open source, so open for improvement. Suggestions are welcome.

Info:

Compressed drivers can get installed as any normal driver:

  • OemPnPDriversPath
  • nLite
  • manual installation
  • WHQL kept

Benefits:

  • Smaller files on installation media
  • Seperate drivers from the extra's.

Usage:

Copy compress.cmd to the driver dir and execute it.

The detected driver files are created in new subdirectories, so make sure you have write-access.

When you receive errors running the batch or the result is not as expected please tell me on which driver this behaviour occured and if possible provide me a downloadlink to the driver package

Limitations

- Driver Compressor only processes inf's in the directory it's working directory.

Download :

drv_comp.cmd

Last update 27 october 2005:

-Fixed truncated extension on decompress (minor)

25 october 2005:

- Added Long File Name support

- Added Subdir-reference support

- Improved dependant files check (minor)

- End of line detection added to tagscanner (minor)

28 august 2005:

- Minor GUI fixes

- Fixed invalid call causing strange behaviour in specific situations (minor)

03 may 2005:

- Changed detection of Driver class

- Added Tab as delimiter in inf parser

13 march 2005:

- Changed handling of inf's containing no driver signature

- Windows NT detection added (batch won't run on 9x systems)

- Fixed issue about driver files got placed into subfoldertree

- Minor GUI changes

8 march 2005:

- Fixed bug when driver-inf doesn't contain any files to install (Intel Inf drivers)

- Added PAUSE at program exit.

Edited by hp38guser
Link to comment
Share on other sites


Very nice!

I guess you want Windows to be able to decompress these drivers without problems, so you are using cab compression? So this program's main goal is to simplify the compression of driver files for in the I386 directory?

P.S.: never heard of VC++ :P but it does exist apparently :P

EDIT: is it difficult?

Link to comment
Share on other sites

Yes, I decided to create such a tool for additional drivers I need for my unattended cd. I use nLite, but I prefer to use the winnt.sif method for adding extra drivers. nVidia drivers are known to be over 40 MB, but then I noticed the setup.inf method Windows uses during hardware installation copies less files than the nVidia installer.

Now you can trim down your nVidia drivers to less than 10 MB.

Note. this batch file doesn't support multiple inf's per directory yet. It used the first one detected now. I'm fixing this now.

P.S. VC++ is Microsoft Visual C++. I'm using the 2005 Express beta variant which doesn't have MFC anymore. In stead the .NET 2.0 Framework is used.

Link to comment
Share on other sites

Nice script !

I like people sharing their knowledge in batch scripting. It help me to improve my own batch files and create new one.

And i agree with you with the huge size of NVidia drivers.

Does it mean that i can use the compressed folder to install my Nvidia board just adding the path to WINNT.SIF OemPnPDriversPath=

I have made some modifications to your batch file in order to put the result in

a new subdir using variables set at start of the batch file or assigned by reading the INF file:

::Select Package Source Dir
SET PV=nvidia_Quadro4_41_04_w2k_wxp\WinXP
::SET PV=ad_198x_v5_12_01_3621_w2k_wxp\SMAXWDM\W2K_XP
::SET PV=FSC_1001614\PRO1000\WS03XP2K
::Manufacturer Source Dir
SET SRCPATH="C:\fsc.tmp\Display\%PV%"
::SET SRCPATH="C:\fsc.tmp\sound\%PV%"
::SET SRCPATH="C:\fsc.tmp\network\%PV%"
::Default Destination Dir Root
SET DESTDIR="C:\PnPDrvrs"

../..

PUSHD %SRCPATH%
FOR /F "tokens=1,2 delims=:= " %%i IN ('TYPE %INFNAME% ^| FIND "Class" ^| FIND /I /V "GUID" ^| FIND /I /V "Name" ^| FIND /I /V "= Class section ="') DO (
SET CLASSNAME=%%j
)
POPD

both .INF and .CAT + Compressed files are copied to:

::Create FQ Destination Dir
IF NOT EXIST == "%DESTDIR%\%INFDIR%\" (MD %DESTDIR%\%INFDIR%)

Note. this batch file doesn't support multiple inf's per directory yet. It used the first one detected now. I'm fixing this now.

Intel Corporation graphics adapter is one of this annoying driver with more than one inf and cat file.

How to check which one is the real inf installer, for example i830mnt5.inf for an Intel 865 integrated display and to set the destination to \PnPDrvrs\Display\i830mnt5

Thanks hp38user.

Link to comment
Share on other sites

I have just edited my previous post with a code to solve my need to set a CLASSNAME variable EQUAL to the Class value in the inf file.

Need only one FOR /F command line where you use two FOR /F command lines :)

First attempt with your new batch file:

trying to compress Intel display Drivers with a302.inf to a314.inf (12 inf files) + ialmnt5.inf ; ikch8xx.inf ; isb8xx.inf ; Vch.inf ; wa301a.inf ; wa301b.inf (6 inf files) + various exe, dll and sys files.

if we take a look at the inside, only ialmnt5.inf has a Class=display and is used to install the driver. Others inf's are copied by ialmnt5.inf copy sections, like exe sys and dll.

The batch create a DisplayCodec dir and a302 subdir and copy a302.sys and a302.cat uncompressed and a302.sy_ (compressed) in subdir and then exit.

Can you add a check on the Class value to determine which inf file to use?

Link to comment
Share on other sites

Nice try Bilou_Gateux, but I have used an alternative method to do the same thing which work with all setup iles

I don't understand "iles". It is a typo error or should i go back to school to learn English :lol:

The other problem i would like to fix: set the folder name to the first eight chars for drivers with Class name longer than 8 like Class=SmartCardReader

Link to comment
Share on other sites

nVidia drivers are known to be over 40 MB, but then I noticed the setup.inf method Windows uses during hardware installation copies less files than the nVidia installer.

Now you can trim down your nVidia drivers to less than 10 MB.

Do you mean compressed or decompressed?

After using your batch on nVidiadrivers, three directories were created:

1. A maindirectory called Display

2. Two subdirectories in Display called nv4_disp and nv4disp2

Which directory do I need for my Unattended Disc?

They both have almost the same files but nv4_disp is a little bigger (about 0.02mb).

BTW, I have a Geforce4 TI4200 8x AGP

EDIT:

What is installed by nVidia-installer that isn't installed by windows-setup.inf-method?

Link to comment
Share on other sites

Report on check with NVidia display Drivers (i'm not using the latest available version but a customized version from my OEM):

No problem. One Display dir with a subdir containing one inf, one cat file and all others files compressed.

Report on check with Intel display Drivers:

1/ DisplayCodec dir is created with one subdir for each a3xx.inf, vch.inf, wa301x.inf file with Class=DisplayCodec in [Version] section. Each subdir content is an inf file, a cat file and a sy_ file.

2/ Display dir is created with an ialmnt5 subdir in it.

The content is exactly what is expected: both ialmnt5.inf and ialmnt5.cat non compressed + all others exe, dll sys compressed. Even inf and sy_ from Class=Displaycodec and Class=IntelUnifiedDisplayDriver are present. Only cat files are missing.

3/ IntelUnifiedDisplayDriver is created with one subdir for both ikch8xx.inf and isb8xx.inf file with Class=IntelUnifiedDisplayDriver in [Version] section. Each subdir content is an inf file, a cat file and a sy_ file.

How to avoid creation of dirs for infs with Class that aren't used for base driver install? Inf files containing a [ClassInstall32] section should not been parsed.

Their Class= in [Version] section isn't a predefined classes used by class installer.

Some infos come from here

Link to comment
Share on other sites

Brilliant work, been looking for somthing like this for while, having trouble with my drivers though!

I get error "file not found" or it just goes into a loop?

Here they are incase you want to take a look

Cheers

Epson Stylus Colour 670

Audio, VGA, Chipset Drivers

SpeedTouch 330 ADSL

Also, is there any way to find out if there are any extra files that arent needed, the audio drivers are 34MB uncompressed! Obvious files are help files but there must be more. Any ideas?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...