Click here to Skip to main content
11,411,494 members (64,697 online)
Click here to Skip to main content

Service wizard

, 21 Jan 2004
Rate this:
Please Sign up or sign in to vote.
Service wizard integrated with the Visual Studio IDE.

Introduction

Service applications always have the same skeleton. Therefore, it would be nice to have a service wizard integrated with the Visual Studio IDE (Integrated Development Environment).

My service wizard was created by the "Custom Wizard" project type. Its output is an AWX file that should be copied to <Visual Studio directory>\Common\MSDev98\Template folder.

Therefore, when creating service projects, choose "Service Wizard" from the project type list.

One wizard step

As seen from the image above, there are 3 parameters for service installation:

  1. Displayed service name - This is the text that will be displayed when opening the service control manager.
  2. Startup type.
  3. Should the service interact with the desktop?

Install and uninstall your service

The wizard writes down code for installing and uninstalling your service. Running your executable with the '/Install' or '/Uninstall' parameter will install or uninstall the service, respectively.

Debugging your service

Since the created project (by the wizard) is a console application, you can debug your service as if it were just a console application and not a service.

TO DO ...

Your application code should be in the method Run() located in service.cpp file. Look for the comment // TO DO: Add code here. This is the place where the service is running.

Updates

  • 9.Apr.2003 - Send WM_QUIT message on service stop request.
  • 18.Jan.2004 -
    1. Start the service automatically when the service is installed and defined to have automatic startup.
    2. Wait for the service to be stopped when uninstalling the service.

Enjoy...

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Dudi Avramov
Web Developer
Israel Israel
No Biography provided

Comments and Discussions

 
GeneralThe servise does not working on Vista Pinmembercoronys20-May-09 21:19 
QuestionWhat is .awx file? PinmemberG Haranadh30-Aug-05 9:46 
AnswerRe: What is .awx file? PinmemberDudi Avramov1-Sep-05 2:32 
GeneralRe: What is .awx file? PinmemberG Haranadh1-Sep-05 10:55 
QuestionService description? PinsussUnimportant user with important question16-Jun-05 11:29 
GeneralDifference between wizards PinmemberSoron26-Jan-04 6:01 
GeneralRe: Difference between wizards Pinmembermilkyhonglee3-Mar-06 4:39 
GeneralThis is a trash, at least 80%+ are trash PinsussAnonymous22-Jan-04 5:44 
GeneralRe: This is a trash, at least 80%+ are trash PinmemberDudi Avramov22-Jan-04 10:00 
GeneralRe: This is a trash, at least 80%+ are trash PinmemberSoron26-Jan-04 6:06 
GeneralNot working and stoping PinmemberAji Varghese6-Nov-03 23:20 
GeneralRe: Not working and stoping PinmemberAji Varghese23-Dec-03 20:23 
GeneralLogEvent... PinmemberMatt Newman12-May-03 8:02 
GeneralRe: LogEvent... PinmemberDudi Avramov12-May-03 22:31 
GeneralRe: LogEvent... PinmemberMatt Newman13-May-03 5:02 
QuestionVC7? PinmemberMatt Newman9-May-03 17:39 
AnswerRe: VC7? PinmemberDudi Avramov10-May-03 22:05 
GeneralRe: VC7? PinmemberMatt Newman11-May-03 4:49 
GeneralNot a good service skeleton PinmemberWout Louwers6-Apr-03 21:56 
GeneralRe: Not a good service skeleton PinmemberDudi Avramov7-Apr-03 4:20 
GeneralRe: Not a good service skeleton PinmemberWout Louwers7-Apr-03 4:31 
GeneralRe: Not a good service skeleton PinmemberDudi Avramov7-Apr-03 22:02 
GeneralRe: Not a good service skeleton PinmemberWout Louwers7-Apr-03 22:13 
GeneralRe: Not a good service skeleton PinmemberDudi Avramov8-Apr-03 2:39 
GeneralRe: Not a good service skeleton PinmemberWout Louwers8-Apr-03 3:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150414.5 | Last Updated 22 Jan 2004
Article Copyright 2003 by Dudi Avramov
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid