Help a noob write a batch file to restart print spooler (and address admin issue)
I have never written a batch file before or done any programming; so I am using this opportunity to hopefully address an ongoing issue we are running into with the new PCs at my company while simultaneously getting my feet wet in this area.
We have a bunch of new PCs running Windows 8. HP has not yet released updated drivers yet. Therefore, some of our printers will sporadically stop working for no apparent reason. We have found that restarting the Spooler usually resolves the issue (at least
until it happens again...)
I found a batch file online that does this (see below); and, I think I understand more or less how it works. However, when I try to run it, the system says "System error 5 has occurred. Access is denied." I'm assuming this happens because I do not have admin
privileges (for the record, yes, the system admin knows I'm playing around with this writing this batch file -- I know I could get him to do it, but I'm trying to figure it out w/o bugging him!) However, if I open the Services (Local) screen, I have permission
to right click on the Spooler and manually command it to Stop or Restart. So, is there a way to create a batch file that does this w/o requiring admin privileges?
NET stop spooler
NET start spooler
Also, is there a better way to write this app (aside from removing the echo and pause commands, which I'm only including as a learning tool/to see what's happening.) Any tips/insight would be greatly appreciated. Thanks!
This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread.