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

  • Featuring Art Schoeller, VP and Principal Analyst, Forrester Research Wednesday, August 31, 2016 10:00 AM PT | 1 PM ET If Agility Is Essential to Your Business Survival--Now's the Time to Start the Move to Cloud! The maturity of cloud platforms has given organizations new confidence in moving mission-critical systems to the cloud, to gain agility, scale and realize cost benefits in the process. How can your company achieve these benefits, and what steps are necessary to begin your contact center's …

  • The future of cloud platforms is at hand. Even if your cloud applications are basic now, your next set of apps will require strong analytics services and tools, as well as features that ease enterprise integration. To fill these needs, consider using not only your current cloud provider but also specialists. Take advantage of not only the big cloud platforms, but also specialized providers in vertical industries; countries and regions; and functional domains including omnichannel, analytics, integration, and …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date