I had a Windows spooler that kept crashing because of bad print files. As  
this was on Server 2008 and not R2 I didn't have driver memory isolation,  
so one of these bad files would DoS the entire server. As this server was  
supplying all student lab printing, when it went down all student printing  
stopped on campus.

So I wrote a script! After the third such crash, it would fire off a  
script to run "del *.* /y" inside the spool directory, and then turn the  
service back on. At the time it would have saved me some late night  
call-out and perhaps let me finish my lunch in peace.

Unfortunately for me, the event-handler's idea of a 'working directory' is  
not the same as a short-cut's idea of a 'working directory', so even  
though I set the script to execute in the "F:\PrintSpool" directory, it  
still ran it in "C:\". The script ran just fine when run directly, but  
when kicked off by the event handling service it behaved differently.  
Windows happily keeps running in this instance, but the next time it  
reboots? Not so much.

It's a pretty quick fix, but it does leave printing out of service until  
it gets done. Not a good thing to have happen on Patch Tuesday night at  
3am.

The script shortly earned itself an explicit change-directory to the right  
location.

-- 
Law of Probable Dispersal:
      Whatever it is that hits the fan will not be evenly distributed.
_______________________________________________
Discuss mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to