Discussion:
Command in batch to start & stop the print spooler
(too old to reply)
Wally J
2023-12-23 23:03:35 UTC
Permalink
I do it manually but is there a command that can be put in a file attached
to a shortcut so that I can start and stop the print spooler on demand?
Merry Christmas!

How does this look for solving almost every problem stated in this thread?
<Loading Image...>
The only issue it doesn't solve is changing the icon color based on status.

It's not worth spending time writing a tutorial to help only one person,
but it's probably worth it to help everyone who ever uses a printer.

We did sort of the same thing (only different) with the nettoggle command
that turns on and off the gateway to connect/disconnect from the network.

Based on that & the information in this thread, I hacked this out; but I
always easily readily admit I am not a programmer by any means whatsoever.

So I've taken the liberty of including the batch experts on the question.

I started with the nettoggle.bat file originally provided mostly by
Zaidy036 20210207 on alt.comp.os.windows-10 which I modified by adding
the information provided by Andy Burns & VanguardLH & Zaidy036 again.

Testing...
Win+R > services.msc
Set the "Print Spooler" "Startup Type" to "Manual".
Manually "Stop" the "Print Spooler" for a known starting point.
Win+R > spooler [Enter]
Tada. Windows cannot find spooler. <== critically important step!
Win+R > cmd [Control][Shift][Enter]
C:\> spooler [Enter] <== the reason for this becomes evident later
'spooler' is not recognized as an internal or external command,
operable program or batch file.
C:\> sc query | findstr /i spooler
C:\> if not errorlevel 1 echo "Spooler is running. Kill it?"
C:\> net stop spooler
The Print Spooler service was stopped successfully.
C:\> sc query | findstr /i spooler
C:\> if errorlevel 1 echo "Spooler is not running. Start it?"
C:\> net start spooler
The Print Spooler service was started successfully.
C:\> vim C:\data\sys\batch\spooler.bat

===< see below for spooler.bat version 0.1 >===
@echo off
REM 20231223 spooler.bat v0.1 starts & stops the Windows print spooler
REM using admin-only commands suggested by Andy Burns & VanguardLH
REM in Usenet thread Message-ID: <um4j5t$1vls9$***@news.samoylyk.net>
REM A taskbar bat shortcut will be more complex as it will likely require
REM creating a new scheduled task as suggested by Zaidy036 in that thread
REM This runs from either a shortcut or from the Run command box.
REM
call sc query | findstr /i spooler
if %ERRORLEVEL% == 0 goto :Stop?
:Start?
set /p user_input=Spooler is not running. Start it?"
if %user_input%==y net start spooler
goto :Icon

:Stop?
set /p user_input=Spooler is running. Stop it?"
if %user_input%==y net stop spooler

:Icon
echo "Change shortcut icon color (red/green) depending on outcome"
exit 0
===< see above for spooler.bat version 0.1 >===

What needs to be added is to make this a taskbar shortcut, where the
suggestion by david to change the color is well beyond my humble skills.

Even making it a taskbar shortcut is much harder than it at first
might appear to someone who has never made a shortcut to a non-desktop
batch file which you'd want to also be called from the Win+R command.

For the print spooler shortcut's icon, you'll likely want what we did
with nettoggle by getting it in two colors (red=off & green=on).

This starts a typical quest for the taskbar shortcut togging icons.
<https://www.google.com/search?q=print+spooler+icon>

But I like to use the icon method I devised for Android outlined here:
<https://groups.google.com/g/comp.mobile.android/search?q=tutorial%20one-tap>

Which starts with an images.google.com search for an appropriate icon.
<https://www.google.com/search?q=icon+print+spooler&tbm=isch>

Which can net you an icon file which you can then colorize as needed.
<https://thenounproject.com/browse/icons/term/print-spooler/>

Or simply use anything that you like that you have displayed on the screen.
a. Press "print screen" on any listing of any number of icons
b. Paste with Control+V into Irfanview & crop using Control+Shift+Y
c. Save as a 48x48px ico file with transparent background if desired
c. Save as C:\data\sys\icon\spooler.ico

It's hard enough to pin a shortcut to a batch file to the taskbar,
and then you still have to run the batch file as administrator, where
you can add the suggestion from Andrew but it's a big security hole:
runas.exe /user:administrator /savecred "%mycommand%"

Instead, I'd use Zaidy036's suggestion for the easiest way to put a
shortcut to an admin command running inside a batch file on the Windows
taskbar is to set up a scheduled task in the Windows Task Scheduler.

To make that scheduled task and to run as administrator:
Win+R > taskschd.msc > Task Scheduler Library > Create Task...
Name = task spooler
Description = start/stop print spooler
Security options = [x]Run with highest privileges
Actions = New > Start a program
Program/script = %comspec%
Add arguments = /c start "" c:\data\sys\batch\spooler.bat

Test that newly created task by rightclicking on it as listed in the
"Task Scheduler Library" listing & selecting "Run" from the context menu.

The hardest part, sometimes, is making a shortcut to a batch file that
Windows will allow the option to pin to the taskbar. The easiest way
to circumvent all those difficulties (try it if you don't believe me),
is to completely ignore the batch file you just made.

Instead, create a shortcut to the scheduled task & not to the batch file!
completely by just making a shortcut that ignores the batch file except to
put it in the comments so that you can find it years from now if needed.

Using Zaidy036's suggestion, the spooler.bat.lnk shorcut TARGET is:
TARGET=C:\Windows\System32\schtasks.exe /run /TN "task spooler"
COMMENT=C:\data\sys\batch\spooler.bat
Advanced = [x]Run as administrator
Which you can create from scratch using the rightclick context menu:
a. Open Windows file explorer to C:\data\sys\link\
b. Rightclick > New > Shortcut
c. In "Type the location of the item:", paste this target line:
C:\Windows\System32\schtasks.exe /run /TN "task spooler"
d. Next
e. In "Type a name for this shortcut", call it "spooler"
f. Finish
g. Rightclick on the resulting "spooler.lnk" file
h. Set "Comments" to "%comspec% /c start "" c:\data\sys\batch\spooler.bat"
i. Click the "Change icon" button
j. In "Look for icons in this file", press "Browse" to go to where
you created the icon, e.g., "C:\data\sys\icon\spooler.ico"
k. Press "OK"
l. Rightclick on that shortcut & select "Pin to Taskbar"

Notice this avoids all the problems inherent in Windows' dislike of taskbar
shortcuts to admin batch files since the shortcut points to the scheduled
task (so only the admin scheduled task is what points to the batch file).

Also, by posting this to archived newsgroups, it also solves the original
problem of searching for the problem set to find an exact solution for it.
<http://alt.comp.os.windows-10.narkive.com>
<http://groups.google.com/g/alt.msdos.batch>
<http://groups.google.com/g/alt.comp.microsoft.windows>

As always, if you know more than I do, please add on-topic value,
especially if you can figure out how to change the icon color on the fly.
--
Usenet is a team of intelligent experienced people who help each other out.
The result is saved into the combined tribal knowledge of the newsgroup.
Which is available to the entire world to benefit from now & in the future.
Wally J
2023-12-23 23:43:59 UTC
Permalink
Drat. I forgot to add the elegantly lovely regedit steps to the tutorial.
<https://i.postimg.cc/mkLPrZpG/spooler01.jpg>

This is one of the most fantastic registry keys in all of Windows.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
spooler.exe = C:\data\sys\batch\spooler.bat
Yet I'll bet 999,999 out of a million people don't even know about it!

What it allows is "Win+R" (which is an icon on your taskbar already, BTW)
to run any command on your system no matter where it is located.
Win+R > spooler

Note that the test of whether the "spooler.{list of executable extensions}"
previously existed was the important stuff in the prior tutorial steps.

Also note AppPaths use - which is EXTREMELY IMPORTANT as it is NOT OBVIOUS!
a. I chose to make the AppPaths point to the batch file & not the shortcut!
b. That means the batch file has to run as the system administrator
c. But that's _easy_ to do if you know the [Control][Shift][Enter] trick!
Win+R > spooler [Control][Shift][Enter]
Which works when you set the elegantly useful AppPaths registry key to:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
spooler.exe = C:\data\sys\batch\spooler.bat

Of course, had I set the Registry AppPaths key not to the batch file
but to the shortcut (which itself pointed to the scheduled task), then
I wouldn't need to add the [Control][Shift] to the [Enter] action.
Win+R > spooler [Enter]
Which works when you set the elegantly useful AppPaths registry key to:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
spooler.exe = C:\data\sys\link\spooler.lnk

Note the choice of "spooler{.ext}" for the AppPaths registry key is
completely arbitrary (which is why the tests were run at the start
of the tutorial) but that the "exe" extension is required by Windows.

Also I forgot to add the Windows-XP style pullout cascade accordion menu
description, in the tutorial, but that's less of an egregious error as
everyone long knows Windows XP menus were never removed from Windows 10.
<Loading Image...>

What I did long ago was COPY my Windows XP start menu folder verbatim
from Windows XP to something like Windows 7 then 8 then Vista, etc.,
where that copy just kept being re-used on all my Windows 10 machines.
<Loading Image...> Windows diagnostic tools

If you don't know how to create a cascade menu on Windows 10, you
just create a folder of whatever name you want to show up on the taskbar.
C:\data\sys\menu
Where you have subfolders for everything you ever do on Windows, such as
C:\data\sys\menu\{archivers,browsers,cleaners,databases,editors,etc.}
For example, for the Windows browsers (one of each is used for any task)
<Loading Image...> Windows browsers

Those subfolders are EXACTLY the same as your program files hierarchy:
C:\apps\{archivers,browsers,cleaners,databases,editors,finance,etc.}
Which is also EXACTLY the same as your installer archive backup folders:
C:\software\{archivers,browsers,cleaners,databases,editors,finance,etc.}
NOTE: I never use plurals except when you have to (e.g., "news");
but I added plurals here so that it's easier for others to fathom.

In this case of the print spooler, you stick the shortcut that you pinned
to the taskbar to any desired folder in that taskbar WinXP-style menu.
<Loading Image...> No cortana search icon
<Loading Image...> Menus are just folders
<Loading Image...> Menu comments displayed
<Loading Image...> Comments can be changed
<Loading Image...> (deleted)
<Loading Image...> Hierarchies should match
<Loading Image...> One web browser per task

Where I would most likely put it into the "os" menu (but mine is a mess)
<Loading Image...> Need to organize os

In summary, the tutorial I wrote up follows on the footsteps of the
previous tutorials for the spelling tester from Herbert Kleebauer and
the network toggling switch tutorial I wrote a few years ago on Xmas.

A. The beauty is it tells you whether or not the spooler is running
B. And it gives you the choice of toggling the spooler if you want

You can run the print spooler administrator toggle from:
1. The all-important RUN box (which runs EVERYTHING you've ever written!)
2. The taskbar icon (pinned to the taskbar, if you can spare the space)
3. The taskbar menu (which runs EVERYTHING you've installed on the PC!)
4. The command line (but then the batch folder needs to be in your path)
Note that the RUN box negates the rest as there's no need to take up
valuable real estate on the task bar (which is at left for that reason).

It doesn't get any better than this, does it?
(As always, if you can improve upon this tutorial, please do!)

Everyone benefits from being able to do whatever we want to on Windows.

The only thing it doesn't do is change colors of the icon based on
the current status of the print spooler (if you can do that, tell us how).
--
BTW, to anyone saying you can google and find all this on the Internet, I
would ask them to point out WHERE they found it in one place, because I
doubt you can find even the information in this lowly tutorial in 1 spot.
Wally J
2023-12-24 19:21:45 UTC
Permalink
Even after accepting the duff cert, the pages still don't render.
I'm seeing what you are seeing now.
However, some groups do work, after a fashion.
Thanks for checking into the problem for me.
Hi Paul and AllanH,

THANK YOU very much for digging into the narkive, where I know so much
about this issue that I must be careful not to inundate you with facts.

Let me try to be extremely concise (which is hard for me, sorry, because,
like Vanguard, Mayayana, Paul, and a few others who care deeply that people
receive all the information they need to process the facts, I'm the same).

1. If this newsgroup was archived in dejagoogle, this conversation
would not matter until February 15 to 22, 2024 as the archives
listed below would not only exist, but they would be working:
<http://groups.google.com/g/alt.comp.os.windows-10>

Since that URL does NOT exist, here's how it "should" work:
<http://tinyurl.com/alt-comp-microsoft-windows>
Which redirects to:
<http://groups.google.com/g/alt.comp.microsoft.windows>
(the reason for the tinyurl being clearer in latter points below)

2. Many years ago, others like Grant Taylor (who used to work at Google)
and I tried to get Mountainview to add the Windows-10 newsgroup,
all, obviously, to no avail (despite heroic efforts on our part).

3. The best I could do was take (I believe it was Frank Slootweg) up
on the suggestion to create a tinyurl to the pc banter web site:
<http://tinyurl.com/alt-comp-os-windows-10>
Which redirected to:
<https://www.pcbanter.net/forumdisplay.php?f=52>
At the time (years ago!) that I created many similar tinyurls.

4. I had known all along about the narkive, but I knew it "sucked".
But now that Google is deprecating the permanent dejagoogle archives,
even narkive matters now, as it contains most of the text newsgroups.
<http://alt.comp.microsoft.windows.narkive.com>
<http://alt.msdos.batch.narkive.com>
<http://alt.comp.os.windows-11.narkive.com>
<http://alt.comp.os.windows-8.narkive.com>
<http://alt.comp.os.windows-95.narkive.com>
<http://alt.comp.os.windows-2000.narkive.com>
<http://comp.os.ms-windows.misc.narkive.com>
<http://microsoft.public.windowsxp.general.narkive.com>
<http://comp.periphs.printers.narkive.com>
<http://alt.comp.microsoft.office.narkive.com>
<http://alt.comp.hardware.pc-homebuilt.narkive.com>
<http://comp.os.linux.narkive.com>
<http://comp.editors.narkive.com>
<http://alt.comp.software.firefox.narkive.com>
<http://alt.comp.software.thunderbird.narkive.com>
<http://comp.mobile.android.narkive.com>
<http://comp.mobile.ipad.narkive.com>
<http://misc.phone.mobile.iphone.narkive.com>
etc.

5. I have been in recent communication with Davide Cavion, the owner of
the narkive, where those discussions are found here in the peering ng.
*Effective February 15, 2024, Google Groups will no longer support new Usenet content*
From: Wally J <***@invalid.nospam>
Newsgroups: news.software.nntp,news.admin.peering,news.admin.net-abuse.usenet
Date: Thu, 14 Dec 2023 18:55:14 -0400
Message-ID: <ulg14i$3o4hi$***@paganini.bofh.team>
<https://groups.google.com/g/news.admin.peering/c/_w1mbwzgzs0>

6. Specifically, please see this post from David, where, people like
Andy, Stan, Paul, Herbert, Vanguard, et al., know so much more than
I do that you're each a better interface to what the narkive needs
than I would or could ever be - so please let him know your concerns.

Here is my post about me asking him to help us with the narkive...
<https://groups.google.com/g/news.admin.peering/c/_w1mbwzgzs0/m/BO5rm7EaAgAJ>
Here is the first response from David Cavion - which explains things...
<https://groups.google.com/g/news.admin.peering/c/_w1mbwzgzs0/m/D5M0oKMdAgAJ>
From: Davide Cavion <***@narkive.com>
Newsgroups: news.admin.peering
Date: Fri, 15 Dec 2023 23:45:22 +0100
Message-ID: <2023121523452261422-***@narkive.com>

In summary, there is tremendous value in a permanent web-search archive
that goes back to the birth of Usenet where we can first and foremost,
search before posting - but more importantly sometimes is we can find
and reference articles for use by anyone on the planet (yes, even your
own mother) where people who know nothing about Usenet can read Usenet
articles without subscribing to a service and installing any software.

The problem is all the archives for _this_ Windows newsgroup... suck.
--
I've taken steps to "unsuck" some of those archives where I would ask
everyone here who cares about this newsgroup to pitch in to help all.
T
2023-12-24 23:49:47 UTC
Permalink
Post by Wally J
In summary, there is tremendous value in a permanent web-search archive
that goes back to the birth of Usenet where we can first and foremost,
search before posting - but more importantly sometimes is we can find
and reference articles for use by anyone on the planet (yes, even your
own mother) where people who know nothing about Usenet can read Usenet
articles without subscribing to a service and installing any software.
The problem is all the archives for_this_ Windows newsgroup... suck.
1+
Wally J
2023-12-30 20:18:04 UTC
Permalink
Post by Wally J
The problem is all the archives for_this_ Windows newsgroup... suck.
1+
For the archives...

Given this will be permanently archived in websearchable archives, here are
updated screenshots which show the process in the detail to get it done:
<Loading Image...> Setting up a printer spooler
<Loading Image...> Setting up the hardware menu
<Loading Image...> Setting up multiple commands
And here is the spooler icon I made, although you can use any desired icon:
<Loading Image...> Printer spooler icon

While a few in this thread told the OP to "go search you idiot", I suspect
not a single one of those who said that has ever done the required task
because it demanded use of a half dozen specific Windows tricks to work.

It's always the case that those who say "lmgtfy" have never done it,
because I suggest that you will NEVER find all these tricks in one spot.
C:\data\sys\batch\spooler.bat
Win+R > taskschd.msc
task spooler=%comspec% /c start "" C:\data\sys\batch\spooler.bat
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\spooler.exe
C:\data\sys\batch\spooler.bat
Taskbar > menu > hardware > printer > spooler
C:\data\sys\link\spooler.lnk
Target=C:\Windows\System32\schtasks.exe /run /TN "task spooler"
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\spooler.lnk
C:\data\menu\hardware\printer\spooler.lnk
C:\data\sys\icon\spooler.ico
etc.

It's not something that is easily found in a Google search, in fact,
because about a half dozen tricks are involved when you want to pin an
administrative icon to a batch file on the Windows taskbar menu to start
and stop any Windows service (which required batch files, the registry,
and the task scheduler to do properly) using a variety of access methods.

Where "properly" is _always_ defined as you can access it any way you like.
Most of which take up _zero_ space on your Windows desktop GUI or taskbar.

Anyone should be able to set up Windows with only essential services
running, & then, when needed, they can start and stop additional services.

NOTE: I no longer use the default Windows menus because they're too easily
polluted and too difficult to clean up after each program install/update.
Luckily, when you set it up the way I described, it's _never_ polluted!

Not only does it last forever, but it's portable, where I've ported my
EXACT Windows-XP menu folder (yes, the actual folder) to each subsequent
Windows version on many machines - and it works just fine on each of them!

All you have to know is how to set it up (but anyone who says you'll find
this setup in anything but my tutorials on the web, I challenge them to
find it as it took years elapsed time to learn all the tricks involved).
*Command in batch to start & stop the print spooler*
<https://groups.google.com/g/alt.comp.microsoft.windows/c/THfefCBM9zw/>

Once set up, it works for every service you could want it to work for.
And you have many consistent ways (all named "spooler") to invoke it.

For example (with a taskbar icon):
Taskbar > spooler
C:\data\sys\icon\spooler.ico

For example (with a taskbar pinned WinXP pullout menu):
Taskbar menu > Hardware > Printer > Spooler

For example (with a taskbar RUN icon & Registry AppPaths => taskschd.msc):
Taskbar > run > spooler [Enter]

For example (with a taskbar RUN icon & Registry AppPaths => spooler.bat):
Taskbar > run > spooler [Control][Shift][Enter]

For example (from the command line with the PATH set accordingly):
Win+R > cmd [Control][Shift][Enter]
C:\> spooler [Enter]

Where here are some of the details necessary to perform the task.

To make the shortcut and to run it as administrator:
C:\data\sys\link\spooler.lnk
TARGET=C:\Windows\System32\schtasks.exe /run /TN "task spooler"
COMMENT=C:\data\sys\batch\spooler.bat
Advanced=[x]Run as administrator

To make the scheduled task and to run it as administrator:
Win+R > taskschd.msc > Task Scheduler Library > Create Task...
Name = task spooler
Description = start/stop print spooler
Security options = [x]Run with highest privileges
Actions = New > Start a program
Program/script = %comspec%
Add arguments = /c start "" c:\data\sys\batch\spooler.bat

To make the RUN command and to run it as administrator:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\spooler.exe
@Default = C:\data\sys\batch\spooler.bat
If you point to the batch file, you need to run it as administrator:
Run -> spooler [Control][Shift][Enter]

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\spooler.exe
@Default = C:\data\sys\link\spooler.lnk
If you point to the link to the scheduled task, you can just hit enter:
Run -> spooler [Enter]

To run the command from the command line (assuming it's in your PATH):
Win+R > cmd [Control][Shift][Enter]
C:\> spooler [Enter]

To run the command from the Winxp-style accordion pullout menu:
C:\data\menu\hardware\printer\spooler.lnk
Taskbar > menu > hardware > printer > spooler

Create this batch file for the scheduled task to point to as admin:
C:\data\sys\batch\spooler.bat
@echo off
REM 20231223 spooler.bat v0.1 starts & stops the Windows print spooler
REM using admin-only commands suggested by Andy Burns & VanguardLH
REM in Usenet thread Message-ID: <um4j5t$1vls9$***@news.samoylyk.net>
REM creating a scheduled task as suggested by Zaidy036 in that thread

call sc query | findstr /i spooler
if %ERRORLEVEL% == 0 goto :Stop?
:Start?
set /p user_input=Spooler is not running. Start it?"
if %user_input%==y net start spooler
goto :Icon

:Stop?
set /p user_input=Spooler is running. Stop it?"
if %user_input%==y net stop spooler

:Icon
echo "Change shortcut icon color (red/green) depending on outcome"
exit 0

Create any icon you like & have Irfanview save as a 42x42px ICO file.
C:\data\sys\icon\spooler.ico (the background can be transparized)

As always, if you know more than I do, please add value to this quick
tutorial, especially if you can flipflop taskbar icon color as needed.
--
BTW, if anyone says you can google this and find it, you won't, so it
merely means they don't know how to get an administrator command on a
taskbar menu to work - they've certainly never done it - because if they
had done it - they'd never have said that it's easy to find in a search.
T
2023-12-30 23:39:46 UTC
Permalink
Post by Wally J
While a few in this thread told the OP to "go search you idiot", I suspect
not a single one of those who said that has ever done the required task
because it demanded use of a half dozen specific Windows tricks to work.
Hi Wally,

What a wonderful write up! I have it tagged to read more slowly
and may save it to my keepers file.

"go search you idiot" crowd astounds me. "Just google it": the
new RTFM (read the freakin' manual). I have searched
for things before and had no luck. Then asked here, I found
I was searching on the wrong terms. Also, write up
on the web are often difficult to understand, but a personal
response from someone will remove the fog. Sometimes
I suspect the web write ups are for people who already know
what they are doing and just need a quick refresher.

Technical writing is an art form. Not everyone has the
talent. I sure struggle with it.

I also think we are dealing with the "Dunning–Kruger effect"
when folks start that "lmgtfy" crap. Who is forcing them
to read any post? I only pick the posts I think I can help
with. What is stopping them from doing the same?
"Dunning–Kruger effect" hits it on the head.

And by the way, everyone of us had to start at the beginning.
Every new project we approach we are beginners. People
at realize this are not affected by the "Dunning–Kruger effect".

-T
Stan Brown
2023-12-31 00:56:33 UTC
Permalink
On Sat, 30 Dec 2023 16:18:04 -0400, Wally J wrote:
[big snip]

For those who just want to do what the subject line says, I
respectfully suggest Wally's research is overkill. Doesn't mean I
think it's bad in itself, just that it puts a burden on the person
whose needs are simple. Sometimes when I'm posting a long article I
start off with a TL;DR section before going on to the long version.

I'm pretty sure I posted earlier in this thread. A simple google
search for "restart print spooler windows" (without the quotes)
reveals the answer.

1. Open an administrative(*) command prompt.
2. Type "net stop spooler" (without quotes), hit the Enter key, and
wait a few seconds for the command to report it has finished.
3. Type "net start spooler" (without quotes), hit the Enter key, and
wait a few seconds for the command to report it has finished.

(*) The first hit was from Dell, relating to Windows 7, and it didn't
mention an _administrative_ command prompt. Maybe Windows 7 could
execute those two commands in a non-elevated prompt; I don't know.
But Windows 10 needs an admin command prompt, as I quickly found by
experimentation, so I'll bet dollars to donuts Windows 11 does also.
--
Stan Brown, Tehachapi, California, USA https://BrownMath.com/
Shikata ga nai...
T
2023-12-31 03:42:57 UTC
Permalink
Post by Stan Brown
[big snip]
For those who just want to do what the subject line says, I
respectfully suggest Wally's research is overkill. Doesn't mean I
think it's bad in itself, just that it puts a burden on the person
whose needs are simple. Sometimes when I'm posting a long article I
start off with a TL;DR section before going on to the long version.
I'm pretty sure I posted earlier in this thread. A simple google
search for "restart print spooler windows" (without the quotes)
reveals the answer.
1. Open an administrative(*) command prompt.
2. Type "net stop spooler" (without quotes), hit the Enter key, and
wait a few seconds for the command to report it has finished.
3. Type "net start spooler" (without quotes), hit the Enter key, and
wait a few seconds for the command to report it has finished.
(*) The first hit was from Dell, relating to Windows 7, and it didn't
mention an _administrative_ command prompt. Maybe Windows 7 could
execute those two commands in a non-elevated prompt; I don't know.
But Windows 10 needs an admin command prompt, as I quickly found by
experimentation, so I'll bet dollars to donuts Windows 11 does also.
Hi Stan,

In which case, if you decide to respond to the OP's question,
look up the google search links and give them to him.
This helps a lot when the poster has already been searching
on the wrong search terms.

I have had a similar issue with searching for Remote Access
Tool removers. Paul found it instantly. I had the wrong
terms: remote assistance. What a difference one word makes.

Giving RTFM or Just Google It (the new RTFM) is insulting
to the OP. And we have enough of that crap going around this
group as it is.

And no one is forcing you to read posts. If you think
someone is asking you to do their homework for them,
just ignore them.

-T
Stan Brown
2024-01-01 20:53:57 UTC
Permalink
Post by T
In which case, if you decide to respond to the OP's question,
look up the google search links and give them to him.
This helps a lot when the poster has already been searching
on the wrong search terms.
I listed the Google search in my second paragraph.
--
Stan Brown, Tehachapi, California, USA https://BrownMath.com/
Shikata ga nai...
Frank Slootweg
2024-01-02 16:02:12 UTC
Permalink
Post by Stan Brown
Post by T
In which case, if you decide to respond to the OP's question,
look up the google search links and give them to him.
This helps a lot when the poster has already been searching
on the wrong search terms.
I listed the Google search in my second paragraph.
I think 'T' means the URLs found by the search. Note he says "links"
(plural), but a search URL is a single one.

But it's all water under the bridge, because you gave the search and
described the relevant result (the Dell one). So you answered the OP's
question (and so did Andy and I). But the OP shifted the goalposts and
then 'Wally J' (aka 'Arlen Holder') kept/keeps on rewriting history.
Wolf Greenblatt
2024-01-02 22:29:28 UTC
Permalink
Post by Frank Slootweg
Post by Stan Brown
I listed the Google search in my second paragraph.
I think 'T' means the URLs found by the search. Note he says "links"
(plural), but a search URL is a single one.
Thank you for your help. As I replied to Stan, I don't think even fifty
searches would have found everything in this thread as I'd have to have
known all the keywords (like app paths) first and I'd have to know that
pinning a shortcut to run as an admin is different than a regular shortcut
and the batch shortcuts are also different when pinned than non batch ones.

But it's all working now with a lot of easy ways to run it and it tests the
status before doing anything and all of that is done with a single click.

A wonderful bonus is this process should work for any Windows service,
which is where having the name being the command for each one is useful.

Happy New Year!

Wally J
2024-01-01 08:03:35 UTC
Permalink
Post by Stan Brown
But Windows 10 needs an admin command prompt, as I quickly found by
experimentation, so I'll bet dollars to donuts Windows 11 does also.
With all due respects, Stan, it's worse than you seem to be aware of.
Please don't respond until you actually try it WITHOUT reading my tutorial!
*You _will_ fail*

I know you're a smart guy, Stan. But you have to try it to see why Windows
doesn't like pinning a "non-regular" shortcut to its taskbar. Try it first.

As I said, those who have never done it, think it's simple to do.
It's not.

In this case, anyone saying it's simple hasn't done it.
So they're to the left of the Dunning-Kruger Mount Stupid peak.
<Loading Image...>

They're oh so very confident.
And yet, oh so very naive.
Which is a trait of the people to the left of Mount Stupid by the way.
<Loading Image...>

Try it before you respond please.
Let me know if I'm right or wrong about that.

Only Zaidy036 truly understood (based on what he had suggested), although
there are two ways, but the best way is the way Zaidy036 had suggested.

You'll note in my tutorial I had implemented it both ways.
The point being you have to try it to know the pitfalls.

What is not intuitive is that you need to bring in Windows task scheduler
(nor is it intuitive how to pin admin-batch-shortcut-results on the tasbar)
(nor is it intuitive how to easily access admin commands from the RUN box)
(nor is it intuitive how to easily access ANY commands from the RUN box)
(nor is it intuitive how to easily create your own icons with Irfanview)
(nor is it intuitive how to start & stop based on the current status)
(nor is it intuitive how to change the icon color based on the status)
etc.

Anyone who said "lmgtfy" was simply stating they're to the left of Mt
Stupid in that they "think" they know more than they actually know.
<Loading Image...>

In summary, it's easy, if you know how.
What I wrote up, was how.

It's also easy if you skip most of the steps like you did.
But you will fail doing that.

Try it.
Let me know how it works out for you.

BTW, we _still_ need someone to teach both of us how to flip the color of
the pinned taskbar icon between red & green depending on the status so
there's still more to learn with respect to using Windows efficiently.
Stan Brown
2024-01-01 20:55:18 UTC
Permalink
Post by Wally J
Post by Stan Brown
But Windows 10 needs an admin command prompt, as I quickly found by
experimentation, so I'll bet dollars to donuts Windows 11 does also.
With all due respects, Stan, it's worse than you seem to be aware of.
Please don't respond until you actually try it WITHOUT reading my tutorial!
*You _will_ fail*
[shrugs] I _did_ try it before posting, and it worked fine for me.
--
Stan Brown, Tehachapi, California, USA https://BrownMath.com/
Shikata ga nai...
Wolf Greenblatt
2024-01-02 22:24:38 UTC
Permalink
Post by Stan Brown
it worked fine for me.
Thank you for all your help. Over the weekend I had time to comb through
all the suggestions and I implemented every suggestion that was made.

The task bar icon (and run command and Windows batch command and task bar
menu command) tests if the service is running which is helpful because I
don't have to know ahead of time whether it's running or not and then it
will either turn the service on (if it's not running) or off (if it is).

The task bar icon (and all the associated ways of running it) also does
nothing if it's already running and I want to turn it in (or vice versa).

There's no way a search would have found all that I ended up doing to
add the command in all the places that make it easy to run it later.

I don't think even fifty searches would have found everything in this
thread as I'd have to have known all the keywords (like app paths) first.

Only one poster pieced it all together but everyone helped and over the
weekend I had time off to run the tests and it's working wonderfully!

Thank you all for your help in making this work great. Happy New Year!
Loading...