Setting a program up to run as a Win32 Service

Started by
2 comments, last by daerid 21 years, 11 months ago
Ok, I followed the MSDN instructions for this to a T, and the service installs and uninstalls fine. But when I try to start the service from the Service Control Panel applet, I get an "Access Denied" error message. I can''t figure this out. Anybody got any pointers?
daerid@gmail.com
Advertisement
What is the service actually doing? If it''s installing and uninstalling, then you know that you have the service handler working. It sounds like an error when the service actually runs.

Are you doing this with Administrator privilages?

Take care,
Bill
Yes, I have full administrator rights (actually, the Administrator account).

It''s an SMTP listener service, basically just a sinkhole that accepts everything thrown at it and writes some information to a log file.

It''s multi-threaded.
daerid@gmail.com
This doesn''t really exaplain the message you get, but make sure the IIS SMTP server is stopped... Like I said, though, if it was running I''d expect a different message.

Can you run your program as a normal windows program? If you like, I can give you my service framework which allows you to run as a service or as a console app (depending on the command-line parameters)

codeka.com - Just click it.

This topic is closed to new replies.

Advertisement