Click here to Skip to main content
12,239,992 members (63,009 online)
Click here to Skip to main content
Add your own
alternative version

Stats

90.5K views
1.8K downloads
43 bookmarked
Posted

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

You may also be interested in...

Comments and Discussions

 
GeneralThe servise does not working on Vista Pin
coronys20-May-09 21:19
membercoronys20-May-09 21:19 
QuestionWhat is .awx file? Pin
G Haranadh30-Aug-05 9:46
memberG Haranadh30-Aug-05 9:46 
AnswerRe: What is .awx file? Pin
Dudi Avramov1-Sep-05 2:32
memberDudi Avramov1-Sep-05 2:32 
GeneralRe: What is .awx file? Pin
G Haranadh1-Sep-05 10:55
memberG Haranadh1-Sep-05 10:55 
QuestionService description? Pin
Unimportant user with important question16-Jun-05 11:29
sussUnimportant user with important question16-Jun-05 11:29 
GeneralDifference between wizards Pin
Soron26-Jan-04 6:01
memberSoron26-Jan-04 6:01 
GeneralRe: Difference between wizards Pin
milkyhonglee3-Mar-06 4:39
membermilkyhonglee3-Mar-06 4:39 
GeneralThis is a trash, at least 80%+ are trash Pin
Anonymous22-Jan-04 5:44
sussAnonymous22-Jan-04 5:44 
GeneralRe: This is a trash, at least 80%+ are trash Pin
Dudi Avramov22-Jan-04 10:00
memberDudi Avramov22-Jan-04 10:00 
GeneralRe: This is a trash, at least 80%+ are trash Pin
Soron26-Jan-04 6:06
memberSoron26-Jan-04 6:06 
GeneralNot working and stoping Pin
Aji Varghese6-Nov-03 23:20
memberAji Varghese6-Nov-03 23:20 
GeneralRe: Not working and stoping Pin
Aji Varghese23-Dec-03 20:23
memberAji Varghese23-Dec-03 20:23 
GeneralLogEvent... Pin
Matt Newman12-May-03 8:02
memberMatt Newman12-May-03 8:02 
GeneralRe: LogEvent... Pin
Dudi Avramov12-May-03 22:31
memberDudi Avramov12-May-03 22:31 
GeneralRe: LogEvent... Pin
Matt Newman13-May-03 5:02
memberMatt Newman13-May-03 5:02 
QuestionVC7? Pin
Matt Newman9-May-03 17:39
memberMatt Newman9-May-03 17:39 
AnswerRe: VC7? Pin
Dudi Avramov10-May-03 22:05
memberDudi Avramov10-May-03 22:05 
GeneralRe: VC7? Pin
Matt Newman11-May-03 4:49
memberMatt Newman11-May-03 4:49 
GeneralNot a good service skeleton Pin
Wout Louwers6-Apr-03 21:56
memberWout Louwers6-Apr-03 21:56 
GeneralRe: Not a good service skeleton Pin
Dudi Avramov7-Apr-03 4:20
memberDudi Avramov7-Apr-03 4:20 
GeneralRe: Not a good service skeleton Pin
Wout Louwers7-Apr-03 4:31
memberWout Louwers7-Apr-03 4:31 
GeneralRe: Not a good service skeleton Pin
Dudi Avramov7-Apr-03 22:02
memberDudi Avramov7-Apr-03 22:02 
GeneralRe: Not a good service skeleton Pin
Wout Louwers7-Apr-03 22:13
memberWout Louwers7-Apr-03 22:13 
GeneralRe: Not a good service skeleton Pin
Dudi Avramov8-Apr-03 2:39
memberDudi Avramov8-Apr-03 2:39 
GeneralRe: Not a good service skeleton Pin
Wout Louwers8-Apr-03 3:15
memberWout Louwers8-Apr-03 3:15 
GeneralRe: Not a good service skeleton Pin
Dudi Avramov8-Apr-03 21:32
memberDudi Avramov8-Apr-03 21:32 
GeneralRe: Not a good service skeleton Pin
Wout Louwers9-Apr-03 1:02
memberWout Louwers9-Apr-03 1:02 
GeneralRe: Not a good service skeleton Pin
Dudi Avramov9-Apr-03 5:54
memberDudi Avramov9-Apr-03 5:54 
GeneralRe: Not a good service skeleton Pin
Dudi Avramov9-Apr-03 6:02
memberDudi Avramov9-Apr-03 6:02 
Generalpretty basic Pin
Andreas Saurwein17-Mar-03 2:36
memberAndreas Saurwein17-Mar-03 2:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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.160426.1 | Last Updated 22 Jan 2004
Article Copyright 2003 by Dudi Avramov
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid