- Using difx:Driver in WiX to install a device driver with subdirectories
- Posted by Richard Amos on May 28th, 2008
I'm trying to create an MSI, using WiX to install a device driver that have
i386/ and amd64/ directories off the main driver directory (containing the
..INF file). I use the difx
river tag in the component containing the .INF
file to have it copied to System32/DriverStore/, but I don't know how to get
the subdirectories copied there as well? Any ideas?
I know this isn't a WiX forum, but I've tried there. As WiX is really just a
very thin wrapper over the MSI stuff, I thought someone here may have some
insights.
- Posted by Abjad Hawwaz on June 4th, 2008
"Richard Amos" wrote:
machine? Besides, shouldn't you have separate MSI files for the different
platforms? The MSI file contains target platform information in the summary
stream and will refuse to run on the wrong processor type.
If I remember right, DIFx tools don't like it if the driver component files
are in separate directories. I am not sure I understand your situation, but,
based on what I see, you could keep the INF file in a different directory
from the other driver files on the source disk, but then copy all of them
into the same target directory on the host. Then DIFx tools should take care
of everything automatically.
- Posted by craig.e.shea@gmail.com on June 4th, 2008
On Jun 4, 1:12 pm, Abjad Hawwaz
<AbjadHaw...@discussions.microsoft.com> wrote:
I'm with Richard; I too, have a driver that has both 32-bit and 64-bit
versions. While I am not trying to put both versions into the same
MSI, the files are broken up like so:
<DriverDir>
|
|--->i386
where <DriverDir> contains the 2 main *.inf files for the PORt and BUS
devices and the i386 directory contains the 32-bit drivers. The
drivers are signed, so it's not like I can just go change the INF
files.
How would I use DIFxApp with Wix to specify the installation sources
using the folder structure above?
I'd appreciate to hear from anyone with any knowledge on this subject.
Regards,
Craig S.
- Posted by Abjad Hawwaz on June 5th, 2008
<craig.e.shea@gmail.com> wrote in message
news:19c111cb-0b2a-4e38-97e8-ba8571f502e9@m44g2000hsc.googlegroups.com...
This is a quote from the Organizing Applications into Components topic in
the MSDN Library
(http://msdn.microsoft.com/en-us/libr...(VS.85).aspx):
The installer installs all of the resources in a component into the same
directory. It is not possible to install some resources into subdirectories.
I couldn't find any direct confirmation that all of the resources of a
component must reside in the same source folder, but, chances are, they
must. The Component table of an MSI database has a Directory entry for the
entire component. There appears to be no way to specify different locations
for different resources. If DIFxApp requires that all files in a driver
package belong to a single component, then there seems to be no way to use
DIFxApp and MSI with the directory structure you have.
(microsoft.public.platformsdk.msi) to see if there's an MSI expert who could
confirm or refute my conclusion.
- Posted by Pavel A. on June 5th, 2008
Make all source filenames unique, in one flat directory,
and then rename them at install time - like this:
Source files:
=========
x86_my.sys
x64_my.sys
my.inf
In the INF:
=========
[CopyFiles_x86]
my.sys, x86_my.sys
[CopyFiles_x64]
my.sys, x64_my.sys
However, this will copy all files to the driver store, even these that will
never be installed.
Regards,
--PA
"Abjad Hawwaz" <abjdhwz@abcdef> wrote in message
news:ucwdmHsxIHA.2292@TK2MSFTNGP03.phx.gbl...
- Posted by Stephen Connolly on June 6th, 2008
Not sure what the issue is here. Renaming files at install time is
swimming against the tide and could have all sorts or unforeseen
consequences for things like rollbacks and patching.
With DifxApp you let MSI install your files to a standard folder on
the target machine, e.g. under the program files folder, and then you
let DifXApp (via the information in the .inf file) perform the
remainder of the physical and logical installation of the drivers into
the Drivers folder. It's really important that you don't use the MSI
tables to install the files directly into the drivers folder as
DifXApp may break if there is >1 catalog file in the drivers folder.
[I see you don't mention catalog files, but for forward compatibility
you might want to investigate using them.]
As far as renaming the files at install time goes, this may cause
problems down the line, such as with patching files and the like. You
might find it easier to do something along the following lines:
Create 2 components, one for your x86 files and another for your x64
files, and give them mutually exclusive component conditions based on
the processor architecture so that only one of the components is ever
installed on a particular system. That way you don't need to worry
about file name collisions on the target system as you'll only ever
install one or other of the components. And it keeps the install
footprint smaller.
If you are planning to patch this install, then you should also take
care that the component 'source' directories are unique (e.g. sys_x86
and sys_x64 otherwise when you create the admin image during patch
creation the .sys files will collide and overwrite one another.
Stephen
- Posted by Pavel A. on June 6th, 2008
"Stephen Connolly" <sm_spc_2@hotmail.com> wrote in message
news:22980800-644b-47fa-a0f4-57d31937020b@26g2000hsk.googlegroups.com...
Patching? you can't patch a file staged in the driver store.
Rollback should work.
Hmm. Yes, the INF syntax doesn't allow rename of catalogs...
This may require separate INF files for each arch, because
all files referenced by the INF must be present in order to
put the package into the store?
OTOH if MSI installs different files with same names depending on
the target, the checksum in the .cat won't match.
Then it's better just to create separate packages for each arch,
and use INF syntax to prevent installation on a wrong arch.
Regards,
--PA