ExecuteCommand on Windows Service

  • Thread starter Thread starter Steve C. Orr [MVP, MCSD]
  • Start date Start date
S

Steve C. Orr [MVP, MCSD]

I have a windows forms app that interacts with a windows service that I
made.
My windows forms app can iteract with the windows service well. It can
start & stop the service, etc.
But one thing it cannot do is call the ExecuteCommand method of the windows
service.
I get an "access denied" error message when I try.
I've come to understand that the service must somehow have the correct ACL's
set to allow this. But I don't know how to set up the correct ACLs. I'd
like to do it programmatically if possible, but even a manual solution would
be better than nothing for now.

Any suggestions?

Thanks,
Steve
 
Nevermind, I answered my own question. Google didn't fail me after all.
It wasn't an ACL problem.
The problem is that the "command" parameter that is passed to the
ExecuteCommand method must be a number between 128 and 256. (Other values
are reserved by the OS.)
Too bad the documentation doesn't mention such an important detail.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top