Solved

Monitor print spooler

Posted on 2010-09-23
4
688 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
[X]
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
  • 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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

734 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