Solved

Monitor print spooler

Posted on 2010-09-23
4
678 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

Do email signature updates give you a headache?

Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

Join & Write a Comment

A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now