smart Z
asked on
200 users need the same list of network printers
Hi Experts.
I need a vbs script or batch file that will have netowork admin and password and will help me walk around and add 10-15 network printers on 200 desktops. I can not think of an easy way.
Can you help.
Thanks,
I need a vbs script or batch file that will have netowork admin and password and will help me walk around and add 10-15 network printers on 200 desktops. I can not think of an easy way.
Can you help.
Thanks,
The only thing I can thin k of is to use per machine connections, from command promt rundll32 printui.dll,PrintUIEntry /?. I would have to refresh myself on the use of this command before getting more detailed. But in my enviroment it's extremely helpful as users don't have permissions to install drivers.
ASKER
But the problem is when I run it as the user he is asked to pur credentials for the print server that is on different domain. I can only see the print queue when the credentials are entered. Can you please input the sytax for domain\administrator and password: Jumncy. This is just an example. I need to add the domain admin account and password to this script inorder for the user to add the printers successfully.
Thanks,
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks I will try it and will let you know.
If you want to use PowerShell I had some successful tests with this:
$net = new-Object -com Wscript.Network
gc "printers.txt" | % {$net.AddWindowsPrinterConnection($_,"username","password")}
ASKER
Joef12345,
I added a sharename and domain account to your script but I get the error message on line 1 character 75. Error cannot use parentheses when calling a Sub.
do you know what that means.
I added a sharename and domain account to your script but I get the error message on line 1 character 75. Error cannot use parentheses when calling a Sub.
do you know what that means.
ASKER
When I remove parentheses from Line 1 , 2, and 3. I get the error on line 11 Char 76 Error: Cannot use parentheses when calling a Sub
Thanks,
Thanks,
ASKER
Sorry Vaulden we are not that advance to work on powershell yet.
ASKER
what about a windows batch file?
What OS are the clients running?
ASKER
Fixed the script on my own plus the expert did not respond again
http://blogs.technet.com/b/grouppolicy/archive/2009/06/24/gp-preferences-set-a-default-printer.aspx
If not, here is the VBS code that I currently use to add network printers in my network. This will have to be run as the user that needs them.
Open in new window