Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7685919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:21:36+00:00 2026-05-31T19:21:36+00:00

It may well be that I have to write something overly complex for this

  • 0

It may well be that I have to write something overly complex for this and that there is no regular way to do it, but:

How can I get myself a list of all available printer drivers much like the add printer wizard does when it displays them by manufacturer then by printer? I basically need a custom add printer dialog and without this, I’m a bit stuffed 😉

Like this: (ignore the arrow, borrowed image)

enter image description here

I would also need the path to the .inf file denoted by the drivers in the list

EDIT: A little background:

I am attempting to add a printer by invoking the add printer wizard (with elevated privs) in a TS session, adding the printer to the correct TS Port and then attempting to save the information for that printer so as upon login the users printer is added automatically based on values I’ve saved.

So far, I’ve not been able to find a way to get the driver information (preferably the actual path to the .inf file for that printer driver as then I can use PrintUI to install the printer) after adding the printer.

As such, I am resorting to a custom dialog to match the printer driver. As the tool is only used upon initial printer install and only by administrators I don’t mind having a secondary dialog where you choose the driver a second time just so I can save the information.

EDIT: Targeting Windows Server 2008 R2 (Win32_PrinterDriver doesnt appear to work)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:21:37+00:00Added an answer on May 31, 2026 at 7:21 pm

    You can query WMI for information on the printer drivers that are currently in use. The Win32_PrinterDriver class details the available properties. You can use classes in the System.Management Namespace to perform the queries.

    SelectQuery selectQuery = new SelectQuery("Win32_PrinterDriver");
    ManagementObjectSearcher searcher = new ManagementObjectSearcher(selectQuery);
    
    foreach (ManagementObject printerDriver in searcher.Get()) 
    {
        // Your code here.
    }
    

    You can access the properties by indexing to them, i.e. printerDriver["DriverPath"].

    Also see WMI Queries topic on MSDN.

    On an interesting side note, Microsoft has since added a Get-PrinterDriver commandlet to some versions of PowerShell (on Windows 10, etc.) that does something pretty similar to the above code.

    UPDATE: I was looking through old questions and discovered the DriverStoreExplorer project on GitHub. There’s a lot to the code that enumerates all printer drivers, so it does not make sense to reproduce it here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this linq query that works well (although it may be written better,
This may well be simple, but I'm new to Drupal. The organization I work
I know this question may well be the silliest question you've heard today, but
Well, I'm learning Scala so this question may be too basic for most people.
May be I am getting old, but I can't find it...
OK, so this may be getting too complicated for CSS/HTML to handle, but I
I was wondering about the best way to do this: I have an app
This may be a few questions bundled into one, but here is the situation.
this question probably wont be explained very well and that's because I don't really
I'm not overly familiar with Tomcat, but my team has inherited a complex project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.