Archived

This topic is now archived and is closed to further replies.

daerid

Setting a program up to run as a Win32 Service

Recommended Posts

daerid    354
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?

Share this post


Link to post
Share on other sites
Siebharinn    122
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

Share this post


Link to post
Share on other sites
daerid    354
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.

Share this post


Link to post
Share on other sites
Dean Harding    546
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.

Share this post


Link to post
Share on other sites