Re: Assign Printers to computers via GPO startup via vb script
- From: "Alan Morris [MSFT]" <alanmo@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 2 Nov 2006 09:33:22 -0800
these are "user" connections written to the user registry. You need to use
rundll32. This can be performed remotely as well.
http://members.shaw.ca/bsanders/NetPrinterAllUsers.htm
Add per machine printer connection (the connection will be propagated to
the user upon logon):
rundll32 printui.dll,PrintUIEntry /ga /c\\machine /n\\machine\printer
/j"LanMan Print Services"
Delete per machine printer connection (the connection will be deleted
upon user logon):
rundll32 printui.dll,PrintUIEntry /gd /c\\machine /n\\machine\printer
Enumerate per machine printer connections:
rundll32 printui.dll,PrintUIEntry /ge /c\\machine
--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto
This posting is provided "AS IS" with no warranties, and confers no rights.
"Igors Belijs" <IgorsBelijs@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:96C6F93F-DBCF-4449-AF40-5FED7BA1CC75@xxxxxxxxxxxxxxxx
Good day to you all!
Could not find the answer in previous posts, therefore I'm posting a new
topic.
I'm running Windows 2000 domain in native mode, under 2000 SP4 Standart.
The task is to automate shared network printers installation.
I have created GPO, that will run VB script on startup and map those
printers.
Here's the script:
Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection "\\server\HPLaserJet_nd"
objNetwork.AddWindowsPrinterConnection "\\server\DuPrinter"
objNetwork.AddWindowsPrinterConnection "\\server\HPLJ@Hallway"
objNetwork.SetDefaultPrinter "\\server\HPLaserJet_nd"
WScript.Quit
Now for some reason the script does not run when applied to computer, and
no
mapping occur. On other hand if the same script is applied to user, script
works fine.
Permission on the shared printer is set to Everyone = Print.
What can be done to resolve this situation?
.
- Follow-Ups:
- Re: Assign Printers to computers via GPO startup via vb script
- From: Igors Belijs
- Re: Assign Printers to computers via GPO startup via vb script
- Prev by Date: Printing web pages with Internet Explorer 6
- Next by Date: Re: Assign Printers to computers via GPO startup via vb script
- Previous by thread: Printing web pages with Internet Explorer 6
- Next by thread: Re: Assign Printers to computers via GPO startup via vb script
- Index(es):
Relevant Pages
|