Sunday, July 1, 2012

Shortcut to Restart the Print Spooler Service

There are occasions that your computer will not print and says that your printer is offline even though it isn't. In my case, the printer is on another computer on our home network. Because the remote computer stays off most of the time, when it is turned on so I can print, my computer sees it as there but offline.

It is not hard to go to services and restart the print spooler, but I wanted to be able to just click an icon on my desktop and it start working again. Fortunately, it is a simple thing to do, but it is annoying at the same time.

First, here is how to create the icon:

1. Create a batch (.bat) file on your desktop. Name it something like "Restart Print Services" or whatever strikes your fancy.

2. In the batch file, put the following two lines:

net stop spooler

net start spooler

3. Save the file and it is ready to go.


Now, the annoying part. To run this batch file successfully, you have to right click on it and say "Run as Administrator". If you just click on it, it will get errors when it tries to execute the "net" commands.

The simple solution would be to change the batch file to run as administrator. In fact, there is a check box at the bottom of the Properties/Compatibility screen that says just that. Unfortunately, it is grayed out and you can't check it.

I have Googled this issue, but although there are many, many listing and forum entries about it, there hasn't been a solution or explanation (that I can find).

There were two things I have tried that were hopeful, but was quickly shot down...


1. Turn off the UAC (slider bar all the way to the bottom) and reboot. Some people said that this would enable the check box, but I found it was still grayed out. The good news is that the .bat file would run perfectly, the bad news is that the UAC is off leaving you vulnerable to malicious code/viruses/etc. I don't know about you, but I don't want to run with the UAC totally turned off.


2. There is a registry entry you can do that will check the grayed out "Run as Administrator" box. While the registry hack succeeded in checking the box (even though it was still grayed out), it still did not let the .bat file run as administrator.

So far, I do not have a solution. Since the check box is there, I assume that there is something that I (and everyone) is missing to make it active. Why would MS put in something that could never be used?

My search continues... I will post when I find the answer, or if you have the answer please write.

-Commander Dave

No comments:

Post a Comment