Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to ask if there is a way to save printers from current session in Windows 7 through script? I have added some network printers through "Add a printer using a TCP/IP address or hostname". The idea is the information about printers to be saved in a file through script at the end of the session (Log off). When starting the next session (Log on), the printers from the previous session need to be loaded and seen in "Devices and Printers". The purpose is the loading of the last added printers, no matter on which computer the user has been logged in.

I would appreciate your answer!

share|improve this question
If these computers are on a 2008 domain you could use Group Policy Preferences instead. Probably be easier. :) – Ƭᴇcʜιᴇ007 Jun 12 '13 at 19:26

Generally it is best to do this through Group Policy or some sort of GP overlay, like Desktop Authority.

If you use straight-up GP, then you should find this guide helpful:

If you are using something to manage GP, than it should have a section on printers. You will want to look under user management and not computer management.

share|improve this answer

First it maybe easier via Group Policy, but here is the answer anyway.

You can do it with windows scripting.


Has example scripts to use as source material.

You will need to extract the port,printer, and driver info.

You can even install printers remotely from the server using the script if you program in the some admin credentials.

Provided you don't delete the drivers between user logins. Adding the drivers every time can be a slow process.

Something like this will create a printer: You may be able to omit the "-u" "-w" "-s" flags if the operation is considered local.

C:\Windows\System32\Printing_Admin_Scripts\en-US\prndrvr -u <username> -w <Password> -s <computername> -a -m "HP Universal Printing PS" -v 3 -e "Windows IA64" -i "\\<UNC to printer driver>\hpcu140v.inf" -h "\\<unc to printer driver\ps-x64-\"
C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -u <username> -w <Password> -s <computername> -d -p <printername>
C:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs -u <username> -w <Password> -s <computername> -d -r <printername>
C:\Windows\System32\Printing_Admin_Scripts\en-US\prndrvr -a -m "HP Universal Printing PS" -v 3 -e "Windows IA64" -i "e:\HP Universal Print Driver\ps-x64-\hpcu140v.inf" -h "e:\HP Universal Print Driver\ps-x64-\"
C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -d -p <printername>
C:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs -d -r <printername>
share|improve this answer

Your Answer


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.