/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (15)

Posted by: spartacus 17 years ago
Black Belt
1
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

Comments:
  • This was very helpfull for me!! many thanks! - showitself 11 years ago
Posted by: KrisBcn 17 years ago
Purple Belt
1
Hello!!
Finally what has worked is a Custom Action to the cscript prndrvr.vbs + args
one for each driver
no need to reboot
clean and simple (not so fast)

Thanks to all!
KrisBcn
Posted by: cnorots 16 years ago
Yellow Belt
1
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.
Posted by: KrisBcn 17 years ago
Purple Belt
0
Hi Spartacus!
Thanks! This info seems to be very complete, I'll try it right now!

KrisBcn
Posted by: AngelD 17 years ago
Red Belt
0
Lets hope this is a USB connected printer [;)]
Posted by: RMR 16 years ago
Yellow Belt
0
Hi

When I did the steps mentioned by you my driver gets added in the driver store but the printer driver icon is not present in printers folder and driver is not there in server properties. Please help me to solve this issue ASAP.
Posted by: RMR 16 years ago
Yellow Belt
0
Mine is not a USB printer i want to do it for a local printer. Similar to that of Add printer wizard how to do using Difx in Basic MSI.
Posted by: KrisBcn 16 years ago
Purple Belt
0
Hi RMR,
I'm sorry but can't help you with Difx, you'd better search this info in the Forum or add a new post.

It's been a while out of here,
Best regards to all

cya!

KrisBcn
Posted by: jmcfadyen 16 years ago
5th Degree Black Belt
0
you can also use rundll /p to add printers.

you can find comprehensive instructions here

www.dx21.com

theres a huge list of run dll commands listed in here.
Posted by: netloony 16 years ago
Senior Yellow Belt
0
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
Posted by: AngelD 16 years ago
Red Belt
0
The DifXApp merge modules will only support Plug'n Play devices such as a USB connected printer.
It will only support signed drivers so if you are not willing to sign them yourself then use dpinst.exe as a custom action.
Posted by: netloony 16 years ago
Senior Yellow Belt
0
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
    Posted by: AngelD 16 years ago
    Red Belt
    0
    In that case; my bad.
    But you will still have a problem with user-rights while the user plug in the device for the first time if they do not have local admin rights.
    Posted by: netloony 16 years ago
    Senior Yellow Belt
    0
    yep i know that.

    But if an admin logs ins (device installation run as) and it finds the driver then i think it's ok so far..
    Posted by: AngelD 16 years ago
    Red Belt
    0
    Open the MSI in ORCA and modify the entry manually in the MsiDriverPackages table.
    Rating comments in this legacy AppDeploy message board thread won't reorder them,
    so that the conversation will remain readable.
     
    This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ