Job Savers NT Service AppWizard

I wrote this wizard, not so much because NT Services are hard to write, but simply because they can be hard to debug if something is slightly wrong, so I figured I'd get the code right, and then automate it.

Instruction

This NT Service wizard is pretty simple to use, you only have to privide:
  • Internal name - Which should be unique, and not include spaces.
  • Display name - The string that you see in the list of the services manager.
  • Comments - You have to decide what level of source code comments you want.

Generated Code

The first thing you will want to do is build your new service, once thats done you can install it by typing:
  • myservice.exe install
Then later on you can remove it with:
  • myservice.exe remove me
The first thing everyone asks me when writting a new service is "What do I do now?" well, once you have your service code, you will add a thread to do the real work you want done, I normally create my threat in the bottom of serviceMain, and then put code in serviceHandler so that my thread gets started/stopped/paused on all the service control notifications.

Install/Uninstall

To install any wizard, you must simply copy the wizard (any .awx file) it to your devstudio/sharedide/template directory.
Conversly, to remove a wizard, simply deleting the .awx file from your template directory while DevStudio isnt running will do it.

Known Problems

You will see (and can ignore) the following warnings when compiling this code:
  • Command line warning D4024 : unrecognized source file type 'd', object file assumed
  • Command line warning D4027 : source file 'd' ignored

Download NT Service AppWizard - 12.9KB



Comments

  • Useful Wiz

    Posted by Legacy on 02/17/2000 12:00am

    Originally posted by: Jase Jennings

    Thanks for posting this wizard, it's been a godsend.
    It works well - no problems encountered other than the project settings switch as mentioned.

    Reply
  • NT service with 2000

    Posted by Legacy on 01/29/2000 12:00am

    Originally posted by: Ricardo

    The services that I created with these class would not start in 2000. Error message "Access deny" .
    
    Do yoy know why.

    Thanks ricardo

    Reply
  • The Known Problems For This Tool

    Posted by Legacy on 05/03/1999 12:00am

    Originally posted by: Xiangyang Liu

    The known problems described in the original post by Ben Knauss seems to be caused by an extra 'd' character inserted between the '/Fd' and the '/c' switches in the project settings generated by this tool.

    The problem goes away after I removed the 'd' character from the project settings manually.

    Reply
  • Wait till you see whats next

    Posted by Legacy on 04/28/1999 12:00am

    Originally posted by: Benjamin Knauss

    Active Directory Wizards, comming soon.

    Reply
  • About the NT Service Appwizard

    Posted by Legacy on 04/28/1999 12:00am

    Originally posted by: Xiangyang Liu

    Thanks for providing such a wonderful tool. I was able to create my own NT services and I didn't even know what a NT service is last week!!!

    By the way, have you figured out what caused the warning messages described in your original post? It would be nice to get rid of those warnings.

    Thanks again.

    Reply
  • Position under VC 6

    Posted by Legacy on 04/14/1999 12:00am

    Originally posted by: J�rg K�nig

    You're doing a great Job!

    under VC 6 this file must go to
    ...\Microsoft Visual Studio\Common\MSDev98\Bin\IDE

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

  • Live Event Date: November 20, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT Are you wanting to target two or more platforms such as iOS, Android, and/or Windows? You are not alone. 90% of enterprises today are targeting two or more platforms. Attend this eSeminar to discover how mobile app developers can rely on one IDE to create applications across platforms and approaches (web, native, and/or hybrid), saving time, money, and effort and introducing apps to market faster. You'll learn the trade-offs for gaining long …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds