Discussion Locked

Need printer login script

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Hello all ? I need a simple login script to set printers already installed on a Citrix/Terminals server as default printers for certain groups. The printers are installed on the Citrix/Terminal server as TCP/IP ports. When the user logs on, I would like for the script to set one of these printers as the default printer for that user. The script will be stored in Group Policy and applied to the appropriate OU. Thanks in advance for your help. RC

2 replies

by wamsleyb

This is the VB script for setting up printers through group policies.

You computers must be in OUs.

The script is inserted under ?user Configuration? ?Scripts? ?Logon?

This example script is for 2 printers you can add more or less by copying and pasting the three lines of code as is just changing the printer name.

open notepad copy and paste this edit it and save it as PrinterScript.vbs.

You will also have to enable User Group Policy loopback processing mode on the policy you create. Under "Computer" "Administrative Templates" "System/Group Policy" "User Group Policy loopback processing mode" Value=merge

Set wshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\SERVERNAME\PRINTERNAME"
WshNetwork.AddwindowsPrinterConnection PrinterPath, PrinterDriver

Set wshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\SERVERNAME\PRINTERNAME"
WshNetwork.AddwindowsPrinterConnection PrinterPath, PrinterDriver
WshNetwork.SetDefaultPrinter "\\SERVERNAME\PRINTERNAME"

Wscript.Echo "Printers Created"

by rcambra

This was close but Citrix users logon to apps deployed from a terminal server (local to the app). The pinter that I need set to default is a local TCP/IP port on the Citrix server not a remote share.

This discussion is closed to new replies.