AppDeploy.com

 


Printer Drivers Package !

Click here to associate this thread with a Package KB article.
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [AppDeploy Forums] >> Package Development >> Printer Drivers Package ! Page: [1]
Login
Message << Older Topic   Newer Topic >>
Printer Drivers Package ! - 10/4/2006 5:48:50 AM   
KrisBcn

 

Posts: 86
Score: 3
Joined: 8/16/2006
From: Barcelona, Spain
Status: offline
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
Post #: 1
RE: Printer Drivers Package ! - 10/4/2006 8:11:13 AM   
spartacus

 

Posts: 408
Score: 41
Joined: 2/4/2004
From: Warrington, United Kingdom
Status: offline
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



_____________________________

La mort ne surprend point le sage Il est toujours prêt à partir.

(in reply to KrisBcn)
Post #: 2
RE: Printer Drivers Package ! - 10/4/2006 8:54:34 AM   
KrisBcn

 

Posts: 86
Score: 3
Joined: 8/16/2006
From: Barcelona, Spain
Status: offline
Hi Spartacus!
Thanks! This info seems to be very complete, I'll try it right now!

KrisBcn

(in reply to spartacus)
Post #: 3
RE: Printer Drivers Package ! - 10/4/2006 6:45:39 PM   
AngelD

 

Posts: 2937
Score: 102
Joined: 6/9/2004
From: Sweden
Status: offline
Lets hope this is a USB connected printer

(in reply to KrisBcn)
Post #: 4
RE: Printer Drivers Package ! - 10/17/2006 11:01:56 AM   
KrisBcn

 

Posts: 86
Score: 3
Joined: 8/16/2006
From: Barcelona, Spain
Status: offline
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

(in reply to AngelD)
Post #: 5
RE: Printer Drivers Package ! - 6/8/2007 10:55:19 AM   
RMR

 

Posts: 2
Score: 0
Joined: 6/8/2007
Status: offline
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.

(in reply to KrisBcn)
Post #: 6
RE: Printer Drivers Package ! - 6/8/2007 10:57:42 AM   
RMR

 

Posts: 2
Score: 0
Joined: 6/8/2007
Status: offline
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.

(in reply to RMR)
Post #: 7
RE: Printer Drivers Package ! - 6/8/2007 12:12:06 PM   
KrisBcn

 

Posts: 86
Score: 3
Joined: 8/16/2006
From: Barcelona, Spain
Status: offline
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

(in reply to RMR)
Post #: 8
RE: Printer Drivers Package ! - 6/12/2007 2:53:17 AM   
jmcfadyen

 

Posts: 754
Score: 30
Joined: 4/19/2004
Status: offline
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.

(in reply to KrisBcn)
Post #: 9
RE: Printer Drivers Package ! - 6/18/2007 11:24:10 AM   
cnorots

 

Posts: 2
Score: 0
Joined: 6/19/2006
Status: offline
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.

(in reply to jmcfadyen)
Post #: 10
RE: Printer Drivers Package ! - 4/1/2008 5:25:11 AM   
netloony

 

Posts: 12
Score: 0
Joined: 10/6/2004
Status: offline
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

(in reply to cnorots)
Post #: 11
RE: Printer Drivers Package ! - 4/2/2008 5:23:02 AM   
AngelD

 

Posts: 2937
Score: 102
Joined: 6/9/2004
From: Sweden
Status: offline
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.

(in reply to netloony)
Post #: 12
RE: Printer Drivers Package ! - 4/2/2008 5:30:00 AM   
netloony

 

Posts: 12
Score: 0
Joined: 10/6/2004
Status: offline
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

    (in reply to AngelD)
  • Post #: 13
    RE: Printer Drivers Package ! - 4/2/2008 5:38:07 AM   
    AngelD

     

    Posts: 2937
    Score: 102
    Joined: 6/9/2004
    From: Sweden
    Status: offline
    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.

    (in reply to netloony)
    Post #: 14
    RE: Printer Drivers Package ! - 4/2/2008 5:45:24 AM   
    netloony

     

    Posts: 12
    Score: 0
    Joined: 10/6/2004
    Status: offline
    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..


    (in reply to AngelD)
    Post #: 15
    RE: Printer Drivers Package ! - 4/2/2008 7:39:56 AM   
    AngelD

     

    Posts: 2937
    Score: 102
    Joined: 6/9/2004
    From: Sweden
    Status: offline
    Open the MSI in ORCA and modify the entry manually in the MsiDriverPackages table.

    (in reply to netloony)
    Post #: 16
    Page:   [1]
    All Forums >> [AppDeploy Forums] >> Package Development >> Printer Drivers Package ! Page: [1]
    Jump to:





    New Messages No New Messages
    Hot Topic w/ New Messages Hot Topic w/o New Messages
    Locked w/ New Messages Locked w/o New Messages
     Post New Thread
     Reply to Message
     Post New Poll
     Submit Vote
     Delete My Own Post
     Delete My Own Thread
     Rate Posts


    Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

    0.047