views:

19

answers:

2

This probably sounds crazy, but it's a real problem: I have an ISV-provided Windows service that I cannot change. There's a bug in the service where it doesn't "clean up" some data that it should upon startup.

As a workaround, until the vendor can fix the bug, I would like to cause another process or script to always run just before this problem service starts.

For example: I could create a second "monitor" service that is tied to the problem service with a service dependency. The second service would perform this workaround/cleanup before the problem service is allowed to start. But that seems like a sledgehammer of a solution to a simple problem. Anyone else have ideas for a simpler solution?

The workaround code is trivial and could live, for example, in a PowerShell script.

+1  A: 

Create a new service that does what you need, then force a dependency on it.

Aaron