But the printer is not plugged in at installation, only after installation

The printer in question is the Rhino 6000 printer driver.

We install the printer in the following way.

1.We first run rundll32 setupapi,InstallHinfSection DefaultInstall 132 C:\WINDOWS\inf\usbprint.inf to install usb printing.
2.The rhino driver is installed, by using dpinst /sa /sw /se from the driver folder.

How can we make sure that the printer is always set as default when the device is installed after installation of the package when users plugin the device ?

We saw 2 options:

1. Run a process per user via activesetup in the background that checks whether the printer is plugged in, if plugged in, set the printer as default and quit process. Mind that this also works when the rhino printer is added to another usb port.

Disadvantage : poll rate will possibly decrease perfomance on pc.

2. Modify the inf if possible so the printer is set as default

Disadvantage : more difficult because driver has to be signed again, this has to be investigate whether we can do this in the environment of the customer.

Please let me know any thoughs you might have on this issue.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Perhaps have a look at the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device
This will contain the device string and name of the default printer for any user.

For a list of devices look at HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices\

I'd suggest you play around with these keys (plug in the printer, note the device string, see if it remains stable enough under different circumstances, 'pre-write' it to a user's registry hive and see if it becomes the default printer...)

PJ
Answered 11/03/2010 by: pjgeutjens
Red Belt

Please log in to comment
2
Doesn't one of the 'prn[something].VBS files have a function for setting the default printer? Is it prnmngr.vbs?
Answered 11/03/2010 by: VBScab
Red Belt

Please log in to comment
0
ding ding ding! we have a winnah! Ian (vbscab) has won the grand prize of 2 ratings points coz he bothered to look at the search and investigate existing resources, not reinvent the wheel!
Answered 11/03/2010 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
0
not reinvent the wheel

I actually found my wheel on google after searching "set default printer registry" and looking around regedit...

I kinda resent that remark.
Answered 11/04/2010 by: pjgeutjens
Red Belt

Please log in to comment
0
your method may be workable but why not use prnmngr.vbs provided with Windows designed to do the job? My comment was directed more to the OP than you.

Peace!
Answered 11/04/2010 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
0
After installation of Printer, go to control panel--> printers-->Right click on printer installed by you and set as default printer.

It will generate the HKCU REG Key, suing Installreite You can capture that reg key and add it into your MSI.
Answered 11/05/2010 by: skt
Orange Senior Belt

Please log in to comment
0
OR, you could use prnmngr.vbs which is provided with Windows...no need for kludgy setup captures
<heaves a heavy sigh>
Answered 11/05/2010 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
0
Owen, what we need is a 104-point font size...
Answered 11/05/2010 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity