Thanks for the info, sealeopard. I will wait for final 4.22 - I don't like running anything that is RC on my network. There are just too many variables to worry about. Win9x, NT4, 2000, XP, Terminal Server, Citrix Metaframe, RAS, VPN, etc.
I'll work on this some more, it isn't currently running yet and I have no error, so need to turn the error reporting to screen.
Printer Name: Q-MIS
Print Server Name: MRH-01
Computer Group Name: Printer_MRH-01_Q-MIS
(I wish I could leave a space between Printer and MRH-01_Q-MIS, but thought maybe that is why my script was failing.)
code:
$WS = GetObject("WinNT://" + @domain + "/" + @wksta + "$$")if @error
? @serrorelse
For Each $grp In $WS.Groups
$GrpName = $grp.Name
if right($GrpName,8) = "Printer_"
$printer = substr($GrpName,9)
$printer = join(split($printer,"_"),"\")
AddPrinterConnection("\\" + $printer)
endif
Next
endif