Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Monitor print spooler

Posted on 2010-09-23
4
683 Views
Last Modified: 2012-05-10
I need a notification that alerts my application when the print spooler is stopped/restarted.  I have an application that uses FindFirstPrinterChangeNotification/FindNextPrinterChangeNotification and this works fine for the events I need to monitor.  However if the print spooler is stopped and restarted this stops working because the notification obect is no longer valid.  I need to be able to monitor the print spooler and when it restarts I can start again with FindFirstPrinterChangeNotification.  I can't seem to find anything that will do this.  Help please.  OS is server 2003/2008
0
Comment
Question by:PeterC_UK
  • 2
  • 2
4 Comments
 
LVL 30

Expert Comment

by:Brad Howe
ID: 33744060
what is the OS 2003 OR 2008?
You can create a triggered email event in 2008 to monitor the print spooler eventlog Event when it stops.
-Hades666
0
 

Author Comment

by:PeterC_UK
ID: 33744159
Thanks but it must work on 2003 as well and I need notification that enables my program to refresh automatically when the spooler starts

Peter
0
 
LVL 30

Accepted Solution

by:
Brad Howe earned 500 total points
ID: 33744189
Ok,
I would suggest requesting this moved to ASP.NET. A simple windows service that does the following.
Monitor Print Spooler.
Notify of it offline.
Restart your custom task/service.
Would be a better approach. You could also use SCOM (System Center Operations Manager) to monitor and automate but a simple windows service may be a better approach given your requirements.
Just a thought,
-Hades666
0
 

Author Closing Comment

by:PeterC_UK
ID: 33768199
Thanks - this pushed me in the right direction.  I solved it by using a named pipe from the InitializePrintMonitor2 call in a port monitor to notify my application that the spooler had started.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question