MSFN Forum: Driver Compressor - MSFN Forum

Jump to content


  • 7 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Driver Compressor Rate Topic: ***** 2 Votes

#1 User is online   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 939
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 06 January 2005 - 07:42 PM

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 :
Attached File  drv_comp.cmd (7.02K)
Number of downloads: 5214

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.

This post has been edited by hp38guser: 05 January 2007 - 09:55 AM



#2 User is offline   Bâshrat the Sneaky 

  • aka Wim Leers
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,214
  • Joined: 29-October 03
  • OS:none specified
  • Country: Country Flag

Posted 07 January 2005 - 03:46 AM

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?

#3 User is online   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 939
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 07 January 2005 - 04:49 AM

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.

#4 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 07 January 2005 - 04:51 AM

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%)


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.

#5 User is online   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 939
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 07 January 2005 - 11:21 AM

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 ;)

#6 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 07 January 2005 - 01:10 PM

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?

#7 User is online   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 939
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 07 January 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 files

#8 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 07 January 2005 - 01:23 PM

hp38guser, on Jan 7 2005, 01:16 PM, said:

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

#9 User is online   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 939
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 07 January 2005 - 01:33 PM

BTW, I said I was gonna fix that, no need for help

#10 User is online   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 939
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 07 January 2005 - 05:55 PM

Fixed the file, it did not work properly. It should work now defenitely.

Man, it's a hard work to get it foolproof :wacko:

#11 User is offline   bucketbuster 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 649
  • Joined: 16-November 03

Posted 07 January 2005 - 09:02 PM

hp38guser, on Jan 7 2005, 04:49 AM, said:

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?

#12 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 08 January 2005 - 01:38 AM

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

#13 User is online   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 939
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 08 January 2005 - 02:25 PM

I missed some GOTO :EOF, and increased the compression (LZX CAB).

If something not working as expected report it here

#14 User is online   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 939
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 09 January 2005 - 05:01 AM

Fixed some more stuff by adding extra checks. It should work now for every driver

#15 User is offline   Xable 

  • XUDPack
  • PipPip
  • Group: Members
  • Posts: 201
  • Joined: 23-November 04

Posted 10 January 2005 - 01:50 PM

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?

#16 User is online   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 939
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 10 January 2005 - 02:21 PM

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:
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 :hello:

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

This post has been edited by hp38guser: 10 January 2005 - 03:17 PM


#17 User is offline   Xable 

  • XUDPack
  • PipPip
  • Group: Members
  • Posts: 201
  • Joined: 23-November 04

Posted 10 January 2005 - 04:59 PM

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 :lol: 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 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 :lol: 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 :D

Cheers

#18 User is online   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 939
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 10 January 2005 - 08:02 PM

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

#19 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 11 January 2005 - 04:40 AM

thanks for the very nice tool :thumbup

installshield decompressor tools:
http://www.cdmediawo...rom/files.shtml


:)

#20 User is online   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 939
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 11 January 2005 - 06:58 AM

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:

[Unattended]
DriverSigningPolicy=Ignore
in your winnt.sif

Updated the batch with some tag-detector. Lines with ";" won't be parsed now.

Share this topic:


  • 7 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy