jowen Posted October 4, 2010 Posted October 4, 2010 I have inherited a generic login script for our users on site and I want to migrate their printers onto a new print server. In testing this I have added an existing q from the functional and current print server to the new print server and manually added the printer from the new print server all works fine. However I now want to push out the print mappings through the login script and it will not see my new printer or map to it. I have also created a manual VBS file to map to the new print server q and again it states printer not found. I think my syntax is correct but any help would be appreciated my script shows this;' ' Printers.vbs - Windows Logon Script.Set objNetwork = CreateObject("WScript.Network") objNetwork.AddWindowsPrinterConnection "\\pilgrims-two\colorICT."My printer is shared out as ColorICT and the server is pilgrims-two, any ideas??Many thanksJo
adamt Posted October 4, 2010 Posted October 4, 2010 ' ' Printers.vbs - Windows Logon Script.Set objNetwork = CreateObject("WScript.Network") objNetwork.AddWindowsPrinterConnection "\\pilgrims-two\colorICT."My printer is shared out as ColorICT and the server is pilgrims-two, any ideas??Many thanksJoTry putting the path to the printer in a variable, then using that variable in the "AddWindowsPrinterConnection" method, as is shown at:http://msdn.microsoft.com/en-us/library/zsdh7hkb%28VS.85%29.aspx
IcemanND Posted October 4, 2010 Posted October 4, 2010 If the code posted if your actual code, remove the period after the printer name.objNetwork.AddWindowsPrinterConnection "\\pilgrims-two\colorICT."toobjNetwork.AddWindowsPrinterConnection "\\pilgrims-two\colorICT"
jowen Posted October 5, 2010 Author Posted October 5, 2010 AdamT, many many thanks, works a treat adding the path to the variable! Jo
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now