Printer Drivers Package !
Hi all!
I've got to package some printer drivers in one msi (only the drivers, no need to add any printer).
I've been searching information everywhere, but I didn't find any solution.
I've tried the Drivers Wizard in IS, but it works if there're only drivers for one printer..
I've tried different custom actions to setupapi.dll and prndrvr.vbs, and none has worked right.
Does anybody have found itself in this situation or knows how to proceed? Any help is welcomed!
Thanks
KrisBcn
I've got to package some printer drivers in one msi (only the drivers, no need to add any printer).
I've been searching information everywhere, but I didn't find any solution.
I've tried the Drivers Wizard in IS, but it works if there're only drivers for one printer..
I've tried different custom actions to setupapi.dll and prndrvr.vbs, and none has worked right.
Does anybody have found itself in this situation or knows how to proceed? Any help is welcomed!
Thanks
KrisBcn
0 Comments
[ + ] Show comments
Answers (15)
Please log in to answer
Posted by:
spartacus
18 years ago
Here's a method using the DIFx merge module - which can be found at the following location
http://www.microsoft.com/whdc/driver/install/DIFxtls.mspx
1) locate the .INF file which the legacy installation uses to install the drivers. Inspect this file in notepad and work out all the files that the driver requires to be installed. This could be as little as a .SYS file, a .CAT file (assuming the driver is signed) and of course the .INF file itself. There may, however be more files (such as DLL's) that are mentioned in the .INF - the key thing here is to get a full list of the files the driver needs.
As you have more than one printer driver to install, you'll need to look at all the INF files involved and make a separate list for each one.
2) In the MSI package you are developing, create separate folders, one-per-driver, named (say) PrinterType1, PrinterType2 &c. If your package deploys software other than just the driver files, these should ideally be made subfolders of the main application folder
(e.g. C:\Program Files\Acme App\PrinterType1),
otherwise just create the folders where most convenient to you - the important thing is to have separate folders for each driver.
3) Next create new components named (say) DriverFilesType1, DriverFilesType2 &c. Again, the important thing is to have one component per driver to be installed Move all the files that you listed from step 1) for each driver into their appropriate component and set one of the files as the keypath for the component - I usually mark the .SYS file as the keypath. The destination of each component should be the folder for that particular driver that you created at step 2)
4) Next, include the DIFx 2.0 Merge Module into your MSI package - it's named DIFxApp.msm (see link above) - you mention you are using InstallShield, so this is done via the Redistributables view and browsing to the DIFxApp.msm file.
5) Incorporating this merge module will, among other things, have introduced a new table into your package, named MsiDriverPackages, you will need to edit this table directly (e.g. use Direct Editor in InstallShield, or use ORCA). For each driver, in the Component column, you need to enter the name of the component you created in step 3) above. If the drivers are signed (i.e. you have a .CAT file) then you can set the Flags column to 0, otherwise you could use 8 for "legacy mode". The Sequence column can be left blank unless you wish to control the order the drivers are installed in, in which case you can enter ascending sequence numbers for each row.
6) That should be all that is needed for DIFx to "do it's thing". If you are working from a legacy snapshot MSI you should now go through the rest of your snapshot package removing anything else that is printer driver-related (because DIFx will now be handling this) these include.
(i) any other instances of the .INF file, typically being deployed to the INF folder
(ii) any other instances of the .SYS file, typically being deployed to the System32\Drivers
folder.
(iii) any other instances of files you listed in step 1) other than those you have put into your new components.
(iv) any .PNF files that your capture picked up
(v) anything in the registry under HKLM\SYSTEM\CurrentControlSet\Enum\Root or HKLM\SYSTEM\CurrentControlSet\Enum\USB
Regards,
Spartacus
http://www.microsoft.com/whdc/driver/install/DIFxtls.mspx
1) locate the .INF file which the legacy installation uses to install the drivers. Inspect this file in notepad and work out all the files that the driver requires to be installed. This could be as little as a .SYS file, a .CAT file (assuming the driver is signed) and of course the .INF file itself. There may, however be more files (such as DLL's) that are mentioned in the .INF - the key thing here is to get a full list of the files the driver needs.
As you have more than one printer driver to install, you'll need to look at all the INF files involved and make a separate list for each one.
2) In the MSI package you are developing, create separate folders, one-per-driver, named (say) PrinterType1, PrinterType2 &c. If your package deploys software other than just the driver files, these should ideally be made subfolders of the main application folder
(e.g. C:\Program Files\Acme App\PrinterType1),
otherwise just create the folders where most convenient to you - the important thing is to have separate folders for each driver.
3) Next create new components named (say) DriverFilesType1, DriverFilesType2 &c. Again, the important thing is to have one component per driver to be installed Move all the files that you listed from step 1) for each driver into their appropriate component and set one of the files as the keypath for the component - I usually mark the .SYS file as the keypath. The destination of each component should be the folder for that particular driver that you created at step 2)
4) Next, include the DIFx 2.0 Merge Module into your MSI package - it's named DIFxApp.msm (see link above) - you mention you are using InstallShield, so this is done via the Redistributables view and browsing to the DIFxApp.msm file.
5) Incorporating this merge module will, among other things, have introduced a new table into your package, named MsiDriverPackages, you will need to edit this table directly (e.g. use Direct Editor in InstallShield, or use ORCA). For each driver, in the Component column, you need to enter the name of the component you created in step 3) above. If the drivers are signed (i.e. you have a .CAT file) then you can set the Flags column to 0, otherwise you could use 8 for "legacy mode". The Sequence column can be left blank unless you wish to control the order the drivers are installed in, in which case you can enter ascending sequence numbers for each row.
6) That should be all that is needed for DIFx to "do it's thing". If you are working from a legacy snapshot MSI you should now go through the rest of your snapshot package removing anything else that is printer driver-related (because DIFx will now be handling this) these include.
(i) any other instances of the .INF file, typically being deployed to the INF folder
(ii) any other instances of the .SYS file, typically being deployed to the System32\Drivers
folder.
(iii) any other instances of files you listed in step 1) other than those you have put into your new components.
(iv) any .PNF files that your capture picked up
(v) anything in the registry under HKLM\SYSTEM\CurrentControlSet\Enum\Root or HKLM\SYSTEM\CurrentControlSet\Enum\USB
Regards,
Spartacus
Comments:
-
This was very helpfull for me!! many thanks! - showitself 12 years ago
Posted by:
KrisBcn
18 years ago
Posted by:
cnorots
17 years ago
Try this is it simple but it works in our enviornment... use dpinst.exe... download from m$oft http://msdn2.microsoft.com/en-us/library/ms790308.aspx
Create a msi that crates a drivers folder with all of the inf file and the supporting files and also copy dpinst.exe to the folder.
add a custom action to your msi to run dpinst.exe /lm /q /sw
this will preinstall the drivers lm handels unsigned driver the q is quiet an sw suppresses the wizzard.
This will not install the printer but when any user plugs in a new printer it will detect it and automaitically install it... if the printer is already attached you can use the rescan switch or devcon.
Create a msi that crates a drivers folder with all of the inf file and the supporting files and also copy dpinst.exe to the folder.
add a custom action to your msi to run dpinst.exe /lm /q /sw
this will preinstall the drivers lm handels unsigned driver the q is quiet an sw suppresses the wizzard.
This will not install the printer but when any user plugs in a new printer it will detect it and automaitically install it... if the printer is already attached you can use the rescan switch or devcon.
Posted by:
KrisBcn
18 years ago
Posted by:
RMR
17 years ago
Posted by:
RMR
17 years ago
Posted by:
KrisBcn
17 years ago
Posted by:
jmcfadyen
17 years ago
Posted by:
netloony
16 years ago
Hi,
I have a problem with a driver, lot's of problems today...:-)
Normaly i install a driver with the dpinst tool, but this doesn't install the driver i have now (it not a signt driver) i use the /LM switch but this doens't work.
Other sollution i'm trying is using the DifXApp MergeModule as described above here, but i can't set the flag to 8 to install legacy drivers. Only flag options i have is 1-7. Setting it to 8 doesn't work...
Someone got a sollution? Using Driver Tools version 2.01
I have a problem with a driver, lot's of problems today...:-)
Normaly i install a driver with the dpinst tool, but this doesn't install the driver i have now (it not a signt driver) i use the /LM switch but this doens't work.
Other sollution i'm trying is using the DifXApp MergeModule as described above here, but i can't set the flag to 8 to install legacy drivers. Only flag options i have is 1-7. Setting it to 8 doesn't work...
Someone got a sollution? Using Driver Tools version 2.01
Posted by:
AngelD
16 years ago
Posted by:
netloony
16 years ago
Tried the dpinst method first, this works if i run it not sillent, as i try to run it /S /LM mode then it doesn't work anymore.
And the Micorosft MSDN says that it should be possible with Difxapp to install unsigned drivers.
http://msdn2.microsoft.com/en-us/library/aa906233.aspx
------------------------------------------------------------------------------------------
by default, DIFxApp does not install unsigned driver packages and driver packages that have missing files. However, DIFxApp supports a flag that configures DIFxApp to install unsigned driver packages and driver packages that have missing files. This flag is set as follows:
To statically set this flag, add 0x0008 to the Flags entry for the component in the MsiDriverPackages custom table that represents the driver package.
To dynamically set this flag, add 8 to the decimal number that is specified by the string that is supplied by the DriverFlags.component-name property for the component
------------------------------------------------------------------------------------------
Bu i'm not be abble to set the flag to 8
And the Micorosft MSDN says that it should be possible with Difxapp to install unsigned drivers.
http://msdn2.microsoft.com/en-us/library/aa906233.aspx
------------------------------------------------------------------------------------------
by default, DIFxApp does not install unsigned driver packages and driver packages that have missing files. However, DIFxApp supports a flag that configures DIFxApp to install unsigned driver packages and driver packages that have missing files. This flag is set as follows:
------------------------------------------------------------------------------------------
Bu i'm not be abble to set the flag to 8
Posted by:
AngelD
16 years ago
Posted by:
netloony
16 years ago
Posted by:
AngelD
16 years ago

so that the conversation will remain readable.