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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printers script in domain

Status
Not open for further replies.

freaklick

Technical User
Aug 11, 2008
4
DE
Hi,

On Win Server 2003, I have placed a VBS script that assigns printers and default printer to users in domain when they log on. All the users get printers and default printer correctly, but when i log on on that server i get every single time this error message:


In big window is script I used, and in the little one is the error message...

I just don't understand that error message..

Could someone please help me with this?
 
Ok, the line that is giving the problem is the 3rd line:
"WshNetwork.AddWi................4730_Black".

Check that you have the name of the printer spelt correctly, and that you have permissions to access the server where the printers are stored.

If this is all fine try adding "On Error Resume Next" at the top of your script and see what happens. If you want to be a bit more thorough rem that line out and see if it happens on the next line. This will eliminate the printer names (provided they are all spelt correctly) and would suggest to me a problem trying to access the server.

Hope this helps

Asjeff
 
Ok i have double checked printer names and they are spelled a ok. I have tried to clear all 3rd line and after re-login on server i got same error message...
I have then added "On Error Resume Next" and I don't get any error messages..
I just wonder why I get error message when I have copied script from microsoft script page and assured that path to printers are right. All printers are network printers but they are installed through that server and shared. I have used admin-domain user.
From my point i am happy that script is functioning as it should - I get all printers on workstations, but that error message was just going on my nerves.

Asjeff thanx for reply
 
So, if the server's printers are already assigned and then you login then you are telling the server to reassign the printers because they aren't connected to it (but...they are?)

If the above is confusing to you (even a little) then just imagin what the server is going through.

--MiggyD

"...embrace the world in gray. Sometimes solutions aren't so simple. Sometimes goodbye's the only way." Shadow of the Day, Lincoln Park (2008)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top