We are currently experiencing some problems with our printer script, so if there's anyone that is good with VB scripting can help me at all (as I am not) I would be really grateful! The script is attached.
Our students use terminal server to access applications, but a couple of the apps are local, so they need a printer mapped on the terminal server as well as on the local printer (ideally) the terminal server one is most important. The script maps it by the first 3 letters of the computer name on the terminal server session, if it's not a TS then it will look at what OU the computer is in and maps the correct printer locally. Most of the time the students get the printer on TS, but the local printer not so often. I've done a lot of testing on the script for each room, using student accounts and it maps both printers 100%.
The script also logs an error if it doesn't map a printer on the terminal server and it supposed to do the same for the local printer too but doesn't.
The main errors we've been getting from students is this one:
..and one instance of this one, which there is actually a printer called HP3600LIB
Date,Server,strclname,%CLIENTNAME%,USER,Other Note, Error Num, Error Description
03/03/2009 13:18:14,SVCTS04,LIB,LIBW02,08dunh,Error Mapping Printer,-2147352567,There is no printer called "\\svcfs02\HP3600LIB".
I thought the problem might be down to timing on logon so have changed it so that the script runs from Group Policy, which I think has improved things but not 100%.
Reading the description of your problem carefully, it's interesting that sometimes the script works perfectly and other times it does not. What's the server load like and how many users do you have concurrently on TS? I'm speculating that it might be a load issue 'possibly'.
I presume you have also tried basics such as stopping and then starting the print spooler, and any other HP related services just to make sure?
Server load seems fine, I have 3 terminal servers and a separate server to load balance them and there's never more than 30 users on concurrently. Today there's just 3 errors logged of 3 students not getting a printer with the 2147023899 error. I haven't tried starting and stopping the print spooler .... I didn't think this would be relevant because the printers work fine?