By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,582 Members | 1,720 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,582 IT Pros & Developers. It's quick & easy.

Get Name of Printer Driver

P: n/a
How can I get the name of a printer driver from the printer name in VB .NET?
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

Use the wmi for that.

' Add a Reference to System.Management

Dim moReturn As Management.ManagementObjectCollection

Dim moSearch As Management.ManagementObjectSearcher

Dim mo As Management.ManagementObject

moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_Printer")

moReturn = moSearch.Get

For Each mo In moReturn

Dim strOut As String

strOut = String.Format("{0} - Driver {1}", mo("Name"), mo("DriverName"))

Trace.WriteLine(strOut)

Next

Ken

---------------------------

"Alan" <Al**@discussions.microsoft.com> wrote in message
news:A0**********************************@microsof t.com...
How can I get the name of a printer driver from the printer name in VB .NET?
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.