Click here to Skip to main content
Licence 
First Posted 16 Mar 2003
Views 80,602
Bookmarked 43 times

Service wizard

By | 21 Jan 2004 | Article
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

About the Author

Dudi Avramov

Web Developer

Israel Israel

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralThe servise does not working on Vista Pinmembercoronys20:19 20 May '09  
QuestionWhat is .awx file? PinmemberG Haranadh8:46 30 Aug '05  
AnswerRe: What is .awx file? PinmemberDudi Avramov1:32 1 Sep '05  
GeneralRe: What is .awx file? PinmemberG Haranadh9:55 1 Sep '05  
QuestionService description? PinsussUnimportant user with important question10:29 16 Jun '05  
I found this incredibly useful and fairly easy to use. Thank you very much. Is there an easy way to set the text description? Service name and displayed name I found. I want to set the text that is displayed in the service manager.
Thanks again.
GeneralDifference between wizards PinmemberSoron5:01 26 Jan '04  
GeneralRe: Difference between wizards Pinmembermilkyhonglee3:39 3 Mar '06  
GeneralThis is a trash, at least 80%+ are trash PinsussAnonymous4:44 22 Jan '04  
GeneralRe: This is a trash, at least 80%+ are trash PinmemberDudi Avramov9:00 22 Jan '04  
GeneralRe: This is a trash, at least 80%+ are trash PinmemberSoron5:06 26 Jan '04  
GeneralNot working and stoping PinmemberAji Varghese22:20 6 Nov '03  
GeneralRe: Not working and stoping PinmemberAji Varghese19:23 23 Dec '03  
GeneralLogEvent... PinmemberMatt Newman7:02 12 May '03  
GeneralRe: LogEvent... PinmemberDudi Avramov21:31 12 May '03  
GeneralRe: LogEvent... PinmemberMatt Newman4:02 13 May '03  
QuestionVC7? PinmemberMatt Newman16:39 9 May '03  
AnswerRe: VC7? PinmemberDudi Avramov21:05 10 May '03  
GeneralRe: VC7? PinmemberMatt Newman3:49 11 May '03  
GeneralNot a good service skeleton PinmemberWout Louwers20:56 6 Apr '03  
GeneralRe: Not a good service skeleton PinmemberDudi Avramov3:20 7 Apr '03  
GeneralRe: Not a good service skeleton PinmemberWout Louwers3:31 7 Apr '03  
GeneralRe: Not a good service skeleton PinmemberDudi Avramov21:02 7 Apr '03  
GeneralRe: Not a good service skeleton PinmemberWout Louwers21:13 7 Apr '03  
GeneralRe: Not a good service skeleton PinmemberDudi Avramov1:39 8 Apr '03  
GeneralRe: Not a good service skeleton PinmemberWout Louwers2:15 8 Apr '03  

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.

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