Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I get the name of the default printer on my machine through the Windows command line?

share|improve this question
add comment

1 Answer

Microsoft Windows XP comes with a VBS script to manage local and network printers from the command line:

  • Get the default printer details from command line:

    cscript C:\windows\system32\prnmngr.vbs -g

  • Get the list of printers added to the system from Windows command line:

    cscript C:\windows\system32\prnmngr.vbs -l

  • Set default printer from windows command line:

    cscript C:\windows\system32\prnmngr.vbs -t -p "\Servername\printername"


Official documentation and more usage examples can be found at:

MS WinXP Product Documentation for the Prnmngr.vbs File

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.