debugging a service

I've downloaded some opensource code that runs as a service.  When I run it in the debugger, a messagebox pops up saying, "Not run as a service!"  Now, I'm no admin (just a humble coder), so I know only the basics about services.  I've looked some for info regarding installing services, but all I can find is code-based ways of installing a service.  I don't want to do that right now, I just want to debug it.  And, later on, when I'm done playing with it, I'd like to run it as a service.

So, two-part question.  Part one:  how do I debug this service in MSDev Visual C++.NET?  Part two:  once I finish playing, can I install it as a service any way OTHER than actually in the code?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Part one: a service starts after windows starts and before any user logging, so can't be debugged with Visual C++. NET. Only if it runs as process, and you can attach the debugger to that process (but you'll miss the starting part).

Part two: A service configuration program uses the CreateService function to install a service in a SCM database. So you can install the service by calling this function.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rwinklerAuthor Commented:
Sorry, I forgot about this question!  
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual C++.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.