Help - Search - Members - Calendar
Full Version: Driver Compressor
MSFN Forums > Unattended Windows Discussion & Support > Device Drivers
Pages: 1, 2, 3

   
Google Internet Forums Unattended CD/DVD Guide
Acheron
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 :
Click to view attachment

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.
Bâshrat the Sneaky
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++ tongue.gif but it does exist apparently tongue.gif

EDIT: is it difficult?
Acheron
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.
Bilou_Gateux
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:
CODE
::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:
CODE
::Create FQ Destination Dir
IF NOT EXIST == "%DESTDIR%\%INFDIR%\" (MD %DESTDIR%\%INFDIR%)


QUOTE
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.
Acheron
I have uploaded a new batch file:

It now handles multiple inf's per dir, and makes subdirs like %class%\%infname%

Please let me know if it works newwink.gif
Bilou_Gateux
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 smile.gif

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?
Acheron
Nice try Bilou_Gateux, but I have used an alternative method to do the same thing which work with all setup files
Bilou_Gateux
QUOTE (hp38guser @ Jan 7 2005, 01:16 PM)
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 laugh.gif

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
Acheron
BTW, I said I was gonna fix that, no need for help
Acheron
Fixed the file, it did not work properly. It should work now defenitely.

Man, it's a hard work to get it foolproof wacko.gif
bucketbuster
QUOTE (hp38guser @ Jan 7 2005, 04:49 AM)
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?
Bilou_Gateux
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
Acheron
I missed some GOTO :EOF, and increased the compression (LZX CAB).

If something not working as expected report it here
Acheron
Fixed some more stuff by adding extra checks. It should work now for every driver
Xable
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?
Acheron
I looked on your Epson Stylus Colour drivers, these files uses a different kind of compression (MSZZ), however it's not supported yet. I'll look at it. Also the class isn't detected properly, gonna fix that soon.

The Realtec Drivers just compress fine, but why do you have so many inf's? It looks like a loop but it isn't. It just ends it loop after the 26th pass wacko.gif
You must find out which inf your Realtec Audio card really uses during Windows Hardware Installation. The compressed size should be around 8 MB.

Currently fixed your problem having with the VIA VGA Drivers, you now will have a folder of just 2.1 MB's instead of 10.2 MB welcome.gif

VIA HyperION drivers are known to be obsolete for Windows XP SP2, however on older systems you can use the compress.cmd on each subfolder. Make sure there's some inf in it!

Your SpeedTouch uses Installshield for its installation. Google the net for some installshield decompressor to extract the driver files. After thats done you can use my batch to compress it to be used during Windows Hardware Installation.

Thanks for giving me this bugreport and providing me the files
Xable
QUOTE
The Realtec Drivers just compress fine, but why do you have so many inf's? It looks like a loop but it isn't. It just ends it loop after the 26th pass wacko.gif
oh so its the inf`s making it repeat itself laugh.gif dont know why there are so many, these drivers are from my mobo driver page here.
i intergrate all drivers accept speetouch with nlite, with the audio drivers i point it to Alcxwdm.inf. so i removed all the other inf`s out of directory and now the file size is 7.58MB thumbup.gif havent tested them yet though.
QUOTE
Currently fixed your problem having with the VIA VGA Drivers, you now will have a folder of just 2.1 MB's instead of 10.2 MB welcome.gif

10 to 2MB wow! Where have you and your batch file been all my life hp38guser laugh.gif never thought that much compresion was ever possible.
QUOTE
VIA HyperION drivers are known to be obsolete for Windows XP SP2, however on older systems you can use the compress.cmd on each subfolder. Make sure there's some inf in it!

just read this thread you only need a few files but when i use your batch it copys even less which is good but when i try to move them into one folder to intergrate with nlite it asks to overwrite one of the .cat files. is this ok? what are .cat files for?
as for modem drivers, thats a bit complicated for me, i will have to tackle that another day biggrin.gif

Cheers
Acheron
Last update tonight:

Handles now the Class even if tabs are used in driver infs and support added for files which are compressed yet.

Even the Epson drivers ( 3.75 MB compressed with SZDD ) goes down to 2.40 MB's thumbup.gif
sixpack
thanks for the very nice tool thumbup.gif

installshield decompressor tools:
http://www.cdmediaworld.com/hardware/cdrom/files.shtml


smile.gif
Acheron
Yes sixpack, that will do fine to decompress installshield cabs.

@Ionit, the cat-file is the digital signature Microsoft uses to check the drivers. If this file is missing Windows won't install the driver during Hardware installation Setup unless you specify:

CODE
[Unattended]
DriverSigningPolicy=Ignore
in your winnt.sif

Updated the batch with some tag-detector. Lines with ";" won't be parsed now.
hoppy
thumbup.gif Nice tool. I made a unattended cd with lots and lots of drivers on it (many friends ask me to install and configure their pc) but I can't use it for all of them.
example if used on nvidia drivers it installs only in english and some functions aren't available (the pre-settings for most common games etc )
But an inf install during setup from the full map does it right.
There are no diffrences in the inf so why ???? I realy don't know.
Never the less awsome tool
Acheron
nVidia's using the coinstaller to setup additional components.

However I'm creating a minimalistic XP setup and don't need those extra's. They just consume lots of memory when used.
With the minimal nVidia drivers I can play all 3D-games without any problems cool.gif

@Hoppy, tell me which drivers are causing problems and I'll take a look at it.
Xable
QUOTE

Thanx sixpack for the link, cant seem to get the cabs to extract though, most likely i`m doing somthing wrong. I have no experience doing this unsure.gif maybe somone can point me in the right direction.
QUOTE
Even the Epson drivers ( 3.75 MB compressed with SZDD ) goes down to 2.40 MB's thumbup.gif

Great work.
BTW, have done nlite install with these drivers and all seems well, have got rid of cat files aswell & saved another half a meg biggrin.gif I thank you. thumbup.gif
sixpack
i have a question to
i use ati drivers, and when i exstract the setup.exe there are subfolders.
is it the best way to copy all of the contense of every subfolder in to one and then run your driver batch?
hoppy
Version: 66.93 (Got rid of the setup exe en stuff but kept other dll's)
I myself don't need the extra's as I know you don't need them, but the biggest isue is the language (dutch) isn't selected. It's for the people I install windows for.
sixpack
QUOTE (hoppy @ Jan 12 2005, 11:31 AM)
Version: 66.93 (Got rid of the setup exe en stuff  but kept other dll's)
I myself don't need the extra's as I know you don't need them, but the biggest isue is the language (dutch) isn't selected.  It's for the people I install windows for.

66.93 is Nvidia tongue.gif
hoppy
Sixpack this was a reply on a question of hp38quser not on your's newwink.gif
sixpack
QUOTE (hoppy @ Jan 12 2005, 02:02 PM)
Sixpack  this was a reply on a question of  hp38quser not on your's newwink.gif

use the quote button
or @name smile.gif
hoppy
QUOTE (sixpack @ Jan 12 2005, 07:19 AM)
QUOTE (hoppy @ Jan 12 2005, 02:02 PM)
Sixpack  this was a reply on a question of  hp38quser not on your's newwink.gif

use the quote button
or @name smile.gif

sorry, will do next time.
Acheron
@Hoppy, For dutch language in nVidia Config Panel you only have to copy nvrsnl.dll to the system32 directory. You can copy this file uncompressed in your unattended installation to the following directory:

$OEM$\$$\System32.

For other languages you can use the same file, with the bold text replaced by the language code.

@Sixpack, you have to look for a subdir with an inf and some driver files ( .sys, .dll ), when you get an error that some files are missing, note them down and try to find out if the files are included with the ATI Setup file. Then copy only those files to the directory containing the installation inf and redo the process.

@Ionit, tested your Speedtouch USB drivers with i6comp.exe, you have to type this:

CODE
i6comp.exe e -f data2.cab *.* "C:\SpeedtouchDrivers"
You get a lot of directories, but only some are relevant: PPPoA, PPPoE and WDM. Make sure you only use the "SpeedTouch 330 ADSL Modem Update" drivers, these are newer.
moesasji
QUOTE (hp38guser @ Jan 7 2005, 03:42 AM)
It's a batch file with 1-click behaviour to compress all drivers needed by the driver inf. It compresses all drivers Windows uses during Hardware Installation and copies it to a new directory. You can include that driver folder in the $OEM$ driver part of Winnt.sif for your unattended cd. Driver Compressor doesn't touch setup-infs so this method does also work with digitally signed drivers.

Just copy compress.cmd to the driver dir and execute it.
It recognizes driver files, even if they are compressed yet!

All files are copied to a new subdir so don't worry if something goes wrong rolleyes.gif

Hi,

Thanks for sharing your work with us. As a newbie to unattended installs, I've been reading up on the different methods and possibilities. I'm not a programmer though, nor a very technical computer user.

Although I understand you probably want to spend your time on programming, I'd still like to ask you if you could help me out with some more detailed instructions on how to use your program. Maybe an example or a (excuse the use of dutch language, since I don't know the english word for it:) stappenplan can also enlighten the less-experienced user ?

If you would be so kind to post an example, maybe you can come up with an example that uses the driverpacks by Bashrat: they seem to include all possible drivers and if you can explain where to copy them and then how to use you program, I would be very grateful.

Anyhow, again my thanks for sharing your work and thoughts. It's sharing of work and thoughts that will keep the world turning ! blink.gif
Mekrel
QUOTE (bucketbuster @ Jan 8 2005, 04:02 AM)
QUOTE (hp38guser @ Jan 7 2005, 04:49 AM)
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?

Hi, I would like the same answer to this question, with Nvidea graphics drivers i get 2 sub directories, which do I use?

Also, do I just use the files created how I usualy would?

i.e: put them into folders in the $OEM$\$1\drivers\device folders and then point to them in the PnPdriverspath in Winnt.sif?

If so then this tool is brilliant, so handy for reducing bloated nvidea drivers.

Many thanks
Acheron
@Mekrel, this tool is for compressing the driver files for use with the $OEM$\$1\Driver method. You can change the subdirectory name and copy it to your unattended installation folder. Just follow the steps at http://unattended.msfn.org/xp/drivers.htm after you have compressed the drivers.

For the nVidia drivers I don't know which driver inf you can use. But you can find it out for your hardware in the Device Manager, select your Display card, select to update the driver, point it manually to your compressed driver and press ok, when you leave the compatiblity checked you can see if the inf has support for your card. If not, try the other
Mekrel
Brilliant,

Thanks alot mate, got my nvidea drivers down from 57mb, to 17 biggrin.gif, and gotta delete one of them graphic drivers ones still. Now down to 11.7mb atfter deleteing the nv_dsp2 folder.

thumbup.gif , good luck with your programing.
swgreed
indeed a VERY useful batchfile! thumbup.gif

this would slim down Bâshrat the Sneaky's driverpacks quite a lot smile.gif
Bâshrat the Sneaky
QUOTE (swgreed @ Jan 13 2005, 06:48 PM)
indeed a VERY useful batchfile!  thumbup.gif

this would slim down Bâshrat the Sneaky's driverpacks quite a lot smile.gif

Indeed! I've already sent hp38guser a PM a couple of days ago newwink.gif

I will definetely use cab compression for the winnt.sif method from now!
sixpack
@hp38guser
i have meaby a stupid question, but your batch file cab's the setup.inf to.
does windows uncab it to for the install or must i copy the orginal inf file to in the folder that has bin created
Acheron
Sixpack, the setup.inf file shouldn't get compressed, unless it's specified in another inf. Windows need an uncompressed inf in the driver directory. Please tell me which driver package caused this behaviour
sixpack
DELL v. 5.12.01.3508, A19

http://support.dell.com/support/downloads/...eleaseid=R45973
Acheron
Update:

- now only skips lines beginning with ";"
- prevent compressing main inf and catalogfile

Thanks SixPack

Over an 100 downloads yet
sixpack
QUOTE (hp38guser @ Jan 16 2005, 12:11 AM)
Update:

- now only skips lines beginning with ";"
- prevent compressing main inf and catalogfile

Thanks SixPack

Over an 100 downloads yet

your welcome
thanks for the update yes.gif

EDIT: it did work correct now
Mekrel
just used the new one on the forceware 71.50 from leadtek and it kept creating loads and loads of subdirectories wacko.gif
Ghost82
Hi,

I downloaded the new version this morning but i keep getting this error on several (NOT ALL) drivers i try to compress...
CODE
       ++++++++++++++++++++++++++++++++++++++
               Driver Compressor Tool

                ®2005 Klaas Nekeman
        ____________________________________
        msfn.org - for your unattended needs
       ++++++++++++++++++++++++++++++++++++++

       Setupfile:      W9X90XBC.INF

       Setup directory:        \Net\W9X90XBC.

       File:   W9X90XBC.INF
       1 bestand(en) gekopieerd.
       File:
.\Net\W9X90XBC.\
De syntaxis van de bestandsnaam, mapnaam of volumenaam is onjuist.
       0 bestand(en) gekopieerd.
sourcefile wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.
-1_ wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.
FINDSTR: kan :~0 niet openen
FINDSTR: kan -1_ niet openen
       File:
sourcefile wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.
-1_ wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.


NOTE:
The above errors are in dutch but i'll try to translate it for you:
QUOTE
De syntaxis van de bestandsnaam, mapnaam of volumenaam is onjuist. = The Syntaxis of the filename, directory or volumename is incorrect
QUOTE
sourcefile wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.
-1_ wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.
FINDSTR: kan :~0 niet openen
FINDSTR: kan -1_ niet openen ==

sourcefile is not recognized as an internal or external command, program or batchfile.
-1_ is not recognized as an internal or external command, program or batchfile.
FINDSTR: can't open :~0
FINDSTR: can't open : -1_


guess something goes wrong here...
Acheron
Ghost82, what do you think this flag under my username means newwink.gif

Fixed this stupid thing now. The error happened when no catalogfile was found.

@Mekrel, what files are inside those new created directories. Please give me a link to those drivers
sixpack
QUOTE (hp38guser @ Jan 16 2005, 02:46 PM)
Ghost82, what do you think this flag under my username means  newwink.gif

Fixed this stupid thing now. The error happened when no catalogfile was found.

laugh.gif
Ghost82
QUOTE (sixpack @ Jan 16 2005, 08:24 AM)
QUOTE (hp38guser @ Jan 16 2005, 02:46 PM)
Ghost82, what do you think this flag under my username means  newwink.gif

Fixed this stupid thing now. The error happened when no catalogfile was found.

laugh.gif

I know, but I just wanted to get it clear for the others. newwink.gif
sixpack
QUOTE (Ghost82 @ Jan 16 2005, 05:39 PM)
QUOTE (sixpack @ Jan 16 2005, 08:24 AM)
QUOTE (hp38guser @ Jan 16 2005, 02:46 PM)
Ghost82, what do you think this flag under my username means  newwink.gif

Fixed this stupid thing now. The error happened when no catalogfile was found.

laugh.gif

I know, but I just wanted to get it clear for the others. newwink.gif

was niet lullig bedoelt newwink.gif
Mekrel
http://www.clanee.com/gfx/

in the folders are inf files, named the same as the folder they are in, the other files seem to be the same as whats in the other folders.
Acheron
Mekrel, no problems with your driver. You just have multiple inf's in your directory. You have to found out manually which driver you need.
Mekrel
ok thanks, but i think i got another problem

the 71.50s had some temp reading error so i decided to go back to 66.93,

instead of using the EXE i decided to test out the compressed ones using your tool, install went fine but since then people have recomended 71.20's so I have tried to uninstall the 66.93's but if i try device manager uninstall it says

"Error: failed to uninstall the device, the system may need it to boot"

And if i try via add/remove programes it says

"It appears the nvidea drivers have already been uninstalled, remove from the list?"

but i have nforce drivers which come under that catagory so in no circumstances unless i removed all chipset drivers too should this happen.

Thoughts?
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.