In Windows XP it was possible to add a default printer to all users who log into the machine by adding a printer to one account, set it as the default printer, and then copy the profile for that account to the Default User profile. Windows 7 removed the ability to copy profiles on the fly. You can only copy an administrator account to the Default account during the Sysprep procedure. If you forgot the printer or need to add a default printer after the fact follow this guide:
1. Add a printer through Group Policy Management>Deployed Printers before starting this guide
2. Open a Windows Explorer window and navigate to “%windir%\System32\GroupPolicy\User\Scripts\Logon.
3. Right click anywhere in the folder and select New>Text Document
4. Name the file the name of the printer without spaces and then add a “.vbs” file extension (Ex. TechOfficeRm104.vbs)
5. Right click the file you just made and select Edit
6. Enter the following code, relative to your environment:
a. For a Local Printer (replace *Printer Name* with the name of your local printer):
Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\*PrintServer*\*Printer Name*"
WshNetwork.SetDefaultPrinter PrinterPath
b. For a Networked Printer (one running from a server print queue) (replace *PrintServer* with the DNS name of your print server and *Printer Name* with the share name of the printer (find this by opening a UNC path to the print server (\\printserver), whatever is displayed for that printer is the share name) with the name of your local printer):
Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\*PrintServer*\*Printer Name*"
WshNetwork.SetDefaultPrinter PrinterPath
7. Click File>Save
8. Open Group Policy Management by clicking Start>Run and typing “gpedit.msc”
9. Navigate to Local Computer Policy>User Configuration>Windows Components>Scripts (Logon/Logoff)>Right Click Logon>Select Properties
10. On the Logon Properties Dialog, click “Add…”
11. On the Add a Script Dialog, click “Browse…”
12. Click the script you made and click Open
13. Click OK on the Add a Script Dialog and Logon Properties Dialog
14. Exit Group Policy Management
15. All users will now get the printer you added through Deploy Printers and the printer you specify in your script will be set as the default printer
No comments:
Post a Comment