forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Using devcon.exe to install local and remote printer drivers

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
henrywood
Contributor
Contributor


Joined: 21 Sep 2004
Posts: 66
Location: Copenhagen, Denmark

PostPosted: Mon Jun 04, 2007 10:30 pm    Post subject: Using devcon.exe to install local and remote printer drivers Reply with quote

Hi guys !

I would like to use the devcon tool by M$ to automatically install a

1. Local printer
2. Network printer
3. A Videodriver

via an INF
According to the devcon help the syntax is:

devcon [-r] install <inf> <hwid>
Manually installs a device.
This command will only work for local machine.
Specify -r to reboot automatically if needed.
<inf> is an INF to use to install the device.
<hwid> is a hardware ID to apply to the device.

Now my question is: How do I specify the hwid ? Is it in somewhere in the .INF file ?

Also, how to I tell devcon to map a certain local port to a remote network printer.

And last, what is the HWID to use in case of a videodriver ?


Henrik
Back to top
View user's profile Send private message Send e-mail
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Tue Jun 05, 2007 2:57 am    Post subject: Re: Using devcon.exe to install local and remote printer dri Reply with quote

henrywood wrote:
Now my question is: How do I specify the hwid ? Is it in somewhere in the .INF file ?

I believe it's in the inf file. But you'll have to look in the file and find it, as it can be in different places. And some devices have multiple hardware ids. In the example below the hardware id is USB\VID_11DB&PID_1000

Code:
[DeviceList]                            ;; MSDN: INF Models Section
%VID_11DB&PID_1000.DeviceDesc%=DriverInstall,USB\VID_11DB&PID_1000   ;; First  device
%VID_11DB&PID_1100.DeviceDesc%=DriverInstall,USB\VID_11DB&PID_1100   ;; Second device


and in this next example (below) there are 5 of them (PCI\VEN_104A&DEV_0010&REV_##).

Code:
[Manufacturer]
%Manufacturer%=Mfg
 
[Mfg]
"PowerVR KYRO 32MB/64MB"=KYRO,PCI\VEN_104A&DEV_0010&REV_01
"PowerVR KYRO II 32MB/64MB"=KYROII,PCI\VEN_104A&DEV_0010&REV_05
"PowerVR KYRO II 32MB/64MB"=KYROII,PCI\VEN_104A&DEV_0010&REV_07
"PowerVR KYRO II 32MB/64MB"=KYROII,PCI\VEN_104A&DEV_0010&REV_0F
"PowerVR KYRO II 32MB/64MB"=KYROII,PCI\VEN_104A&DEV_0010&REV_1F


though in device manager the hardware ids for this video card show up as:

PCI\VEN_104A&DEV_0010&SUBSYS_E810104A&REV_0F
PCI\VEN_104A&DEV_0010&SUBSYS_E810104A
PCI\VEN_104A&DEV_0010&CC_030000
PCI\VEN_104A&DEV_0010&CC_0300

so I'm not sure where it's getting the blue bits of info from?

henrywood wrote:
Also, how to I tell devcon to map a certain local port to a remote network printer.

I don't know, sorry.

_________________
cheers

Dave
Back to top
View user's profile Send private message
henrywood
Contributor
Contributor


Joined: 21 Sep 2004
Posts: 66
Location: Copenhagen, Denmark

PostPosted: Tue Jun 05, 2007 5:10 pm    Post subject: Reply with quote

Thanks Dave !

So I guess the conclusion is that you have to know the HWID from the INF file to install that particular driver / device

Also, to answer my own question regarding mapping a local port to a network printer, I discovered that one can use

runh net use lpt2: \\printerserver\share,wait


Thanks for your help


Henrik
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Jun 05, 2007 6:02 pm    Post subject: Reply with quote

Henrik,
Just to let you know there is a AddPrinterConnection method which is part of the Win32_Printer WMI class that should do the same. I have a demo at my forum that shows some of the abilities of the Win32_Printer WMI class. There is also a Win32_PrinterDriver WMI class that has a AddPrinterDriver method. Using WMI would allow you to connect to the machines remotely and install/configure the Printers without having to goto every machine or installing additional software on each machine.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
henrywood
Contributor
Contributor


Joined: 21 Sep 2004
Posts: 66
Location: Copenhagen, Denmark

PostPosted: Tue Jun 05, 2007 6:59 pm    Post subject: Reply with quote

dragonsphere,

I will look into this as well

thx


Henrik
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group