[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Figure out what default printer is being used by an employee.

Posted on 2004-10-21
Medium Priority
Last Modified: 2010-04-13
I want to see if there is a way that a all users profiles can be queried to show the default printer.  
Question by:a_selvaggio
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 27

Expert Comment

by:Asta Cu
ID: 12374286
Hmmm printer defaults is usually at the end-user profile level.... thinking
LVL 27

Assisted Solution

by:Asta Cu
Asta Cu earned 800 total points
ID: 12374311
Until someone pops by with exactly what you need,  perhaps this will be of help
\documents and settings\   all profiles including system profiles "should say".... but unclear.

Are all service packs applied?
LVL 27

Assisted Solution

by:Asta Cu
Asta Cu earned 800 total points
ID: 12374319
What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

LVL 76

Assisted Solution

by:David Lee
David Lee earned 400 total points
ID: 12375510
It depends on what you mean by "all users profiles".  If that means to check all users as each one logs in, then I'd say that's pretty easy.  If instead it means to check all users from a central point without the user being logged in, then I don't think that's doable.  And if it means to check all the profiles on a given machine all at once, without the user being logged in, then I'd say that might be possible, but it'd be difficult at best.

Perhaps if you shared a bit about the intended goal we'd be in a better position to recommend a solution.

Assisted Solution

Beldoran earned 400 total points
ID: 12377293
There is a registry key you can read to get the users defaut printer

HKCU\Software\Microsoft\Windows NT\currentVersion\Windows\Device

If you are happy using vbscript you can use some code like this to find what you want

'Create a wscript shell object
 Set WshShell = WScript.CreateObject("WScript.Shell")

'Get the default printer
defaultPrinterReg = WshShell.RegRead("HKCU\Software\Microsoft\Windows NT\currentVersion\Windows\Device")

I had to use this to find the users default printer and if it was a certain printer set it to another one. If it wasn't then leave it alone. (To many people were printing by default to an expensive colour printer). Using the script with group policy will ensure that it will run when the user logs in.

Note for BlueDevilFan: You may be able to "check all users from a central point without the user being logged in" if you could access their ntuser.dat files as the info will be in there (eg from a romaing profile, or a share to the pc istelf), but I agree that is would be much more work than it is worth. ;-)

LVL 10

Accepted Solution

Longbow earned 400 total points
ID: 12379871
Current User Default printer can ba found with a script :
Save it in a .vbs file.
Or check this thread :

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
Set colInstalledPrinters =  objWMIService.ExecQuery _
    ("Select * from Win32_Printer Where Default = True")
For Each objPrinter in colInstalledPrinters
    Wscript.Echo objPrinter.Name
LVL 27

Expert Comment

by:Asta Cu
ID: 13807912
Thank you.

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question