Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorry, Printer/GP Question (again)

Status
Not open for further replies.

martyh

IS-IT--Management
Aug 9, 2002
63
US
OK, this is driving me nuts. I have two scripts. Here they are:

[red]serverroomprinter.vbs[/red]
Code:
Dim objNetwork, strPrinterPath
strPrinterPath = "\\HCSD-SSF\SVRROOM"
Set objNetwork = CreateObject("WScript.Network") 
objNetwork.AddWindowsPrinterConnection strPrinterPath
objNetwork.SetDefaultPrinter "\\HCSD-SSF\SVRROOM"
MsgBox "Connected Default Printer: " & strPrinterPath
Wscript.Quit

and

[red]noserverroomprinter.vbs[/red]
Code:
Dim objNetwork, strPrinterPath
strPrinterPath = "\\HCSD-SSF\SVRROOM"
Set objNetwork = CreateObject("WScript.Network") 
objNetwork.RemovePrinterConnection strPrinterPath
MsgBox "Removed Printer: " & strPrinterPath
Wscript.Quit

They are assigned in the login script of the user config part of a GP that is linked to an OU that I put computer objects in (basically I want machines in a specific location to have a certain default printer regardless who logs in). We do not use roaming profiles.

RSOP shows that the policy was applied but the printer does not show up, nor does the msg box.

If I run the script on a wkstn it functions just fine.

If I put the script in the "run this program on startup" part of the machine GP it functions also but the user gets a warning with XP SP2 before the vbs runs (and they can stop it of course).

Any pointers as to what I am missing?

Marty
Network Admin
Hilliard Schools
 
OK, solved my own problem. I needed to set the following setting in the Gpol:

"Computer>AdminTemplate>System>Gpol>User Group Policy Loopback Processing Mode" to Merge.

Basically this merges the settings of the Gpol with the logged on users settings.

Hope this helps someone else.

Marty
Network Admin
Hilliard Schools
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top