Hi all hope you can help,
I'm currently practicing with a few servers and trying to work out how to use login scripts to map printers for users upon log on.
What i need is a VBS script to remove all previous printer entries, map two new shared printers and then set one of them as default.
I have created a LOGON.bat which maps drives and sets the time from the server with an additional line inside ‘CALL \\servername\SYSVOL\curriculum.local\scripts\printer.vbs ‘
Then in the same location as the LOGON.bat i have created a printer.vbs file with the following inside.
This does not seem to give me the desired effect, what am i doing wrong? The printer share names are correct.
This is a 2008 server if that helps at all.
Thanking in advanced,
Steve
I'm currently practicing with a few servers and trying to work out how to use login scripts to map printers for users upon log on.
What i need is a VBS script to remove all previous printer entries, map two new shared printers and then set one of them as default.
I have created a LOGON.bat which maps drives and sets the time from the server with an additional line inside ‘CALL \\servername\SYSVOL\curriculum.local\scripts\printer.vbs ‘
Then in the same location as the LOGON.bat i have created a printer.vbs file with the following inside.
on error resume next
Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection "\\servername\HP3600N"
objNetwork.AddWindowsPrinterConnection "\\servername\HPCP1515n"
objPrinter.SetDefaultPrinter "\\servername\HP3600N"
This does not seem to give me the desired effect, what am i doing wrong? The printer share names are correct.
This is a 2008 server if that helps at all.
Thanking in advanced,
Steve