IPB

Google Frontpage Forums Unattended CD/DVD Guide
 Forum Rules Unattended CD/DVD Guide Homepage · MSFN Forum Rules
7 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> Driver Compressor
Acheron
post Jan 6 2005, 07:42 PM
Post #1


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


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


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: Jan 5 2007, 09:55 AM
Go to the top of the page
 
+Quote Post
Bâshrat the Snea...
post Jan 7 2005, 03:46 AM
Post #2


aka Wim Leers
Group Icon

Group: Patrons
Posts: 2214
Joined: 29-October 03
From: Hasselt, Belgium
Member No.: 8748
OS: none
Country Flag


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?
Go to the top of the page
 
+Quote Post
Acheron
post Jan 7 2005, 04:49 AM
Post #3


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


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.
Go to the top of the page
 
+Quote Post
Bilou_Gateux
post Jan 7 2005, 04:51 AM
Post #4


Powered by Windows Embedded
*****

Group: Members
Posts: 752
Joined: 3-January 04
From: Underworld
Member No.: 11874
OS: XP Pro x86
Country Flag


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.
Go to the top of the page
 
+Quote Post
Acheron
post Jan 7 2005, 11:21 AM
Post #5


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


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
Go to the top of the page
 
+Quote Post
Bilou_Gateux
post Jan 7 2005, 01:10 PM
Post #6


Powered by Windows Embedded
*****

Group: Members
Posts: 752
Joined: 3-January 04
From: Underworld
Member No.: 11874
OS: XP Pro x86
Country Flag


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?
Go to the top of the page
 
+Quote Post
Acheron
post Jan 7 2005, 01:16 PM
Post #7


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


Nice try Bilou_Gateux, but I have used an alternative method to do the same thing which work with all setup files
Go to the top of the page
 
+Quote Post
Bilou_Gateux
post Jan 7 2005, 01:23 PM
Post #8


Powered by Windows Embedded
*****

Group: Members
Posts: 752
Joined: 3-January 04
From: Underworld
Member No.: 11874
OS: XP Pro x86
Country Flag


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
Go to the top of the page
 
+Quote Post
Acheron
post Jan 7 2005, 01:33 PM
Post #9


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


BTW, I said I was gonna fix that, no need for help
Go to the top of the page
 
+Quote Post
Acheron
post Jan 7 2005, 05:55 PM
Post #10


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


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
Go to the top of the page
 
+Quote Post
bucketbuster
post Jan 7 2005, 09:02 PM
Post #11


Senior Member
****

Group: Members
Posts: 645
Joined: 16-November 03
From: Netherlands
Member No.: 9546
OS: Vista Home Premium x86
Country Flag


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?
Go to the top of the page
 
+Quote Post
Bilou_Gateux
post Jan 8 2005, 01:38 AM
Post #12


Powered by Windows Embedded
*****

Group: Members
Posts: 752
Joined: 3-January 04
From: Underworld
Member No.: 11874
OS: XP Pro x86
Country Flag


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
Go to the top of the page
 
+Quote Post
Acheron
post Jan 8 2005, 02:25 PM
Post #13


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


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

If something not working as expected report it here
Go to the top of the page
 
+Quote Post
Acheron
post Jan 9 2005, 05:01 AM
Post #14


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


Fixed some more stuff by adding extra checks. It should work now for every driver
Go to the top of the page
 
+Quote Post
Xable
post Jan 10 2005, 01:50 PM
Post #15


XUDPack
**

Group: Members
Posts: 201
Joined: 23-November 04
Member No.: 37191
Country Flag


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?
Go to the top of the page
 
+Quote Post
Acheron
post Jan 10 2005, 02:21 PM
Post #16


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


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

This post has been edited by hp38guser: Jan 10 2005, 03:17 PM
Go to the top of the page
 
+Quote Post
Xable
post Jan 10 2005, 04:59 PM
Post #17


XUDPack
**

Group: Members
Posts: 201
Joined: 23-November 04
Member No.: 37191
Country Flag


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
Go to the top of the page
 
+Quote Post
Acheron
post Jan 10 2005, 08:02 PM
Post #18


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


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
Go to the top of the page
 
+Quote Post
sixpack
post Jan 11 2005, 04:40 AM
Post #19


Senior Member
****

Group: Members
Posts: 515
Joined: 29-May 04
Member No.: 20982



thanks for the very nice tool thumbup.gif

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


smile.gif
Go to the top of the page
 
+Quote Post
Acheron
post Jan 11 2005, 06:58 AM
Post #20


Friend of MSFN
*****

Group: Members
Posts: 879
Joined: 28-June 04
From: Eerbeek
Member No.: 23554
OS: XP Pro x86
Country Flag


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.
Go to the top of the page
 
+Quote Post

Google Frontpage Forums Unattended CD/DVD Guide

7 Pages V   1 2 3 > » 
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 




Lo-Fi Version Time is now: 21st November 2009 - 07:53 AM
All trademarks mentioned on this page are the property of their respective owners
MSFN is not affiliated with Microsoft
Copyright © 2001-2009 msfn.org
Privacy Policy