Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Creating a deployment package for service

Posted on 2004-11-02
6
Medium Priority
?
226 Views
Last Modified: 2010-05-18
Hello I have an application that is a system service, and now I have to create a deployment package for it.

After installation I need my service to start automatically, and start everytime windows starts.

What do I have to do ?
0
Comment
Question by:RodionP
  • 3
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
zahaby earned 1000 total points
ID: 12478696
0
 
LVL 3

Expert Comment

by:zahaby
ID: 12478727
and this one is very good too
with downloadable sample

http://www.codeproject.com/dotnet/simplewindowsservice.asp
0
 
LVL 4

Expert Comment

by:thedude112286
ID: 12527450
In the installer code for your service, include the following:

ServiceProcessInstaller spi = new ServiceProcessInstaller();
spi.Account = ServiceAccount. LocalSystem;
            
ServiceInstaller si = new ServiceInstaller();
si.ServiceName = "Your Service Name";
si.DisplayName = "Your service name";
si.StartType = ServiceStartMode.Automatic; // THIS IS THE IMPORTANT LINE!!!!!!!
            
this.Installers.Add(si);
this.Installers.Add(spi);

Then register the service as usual.
0
 
LVL 4

Expert Comment

by:thedude112286
ID: 12527458
P.S.  After you register the service, you need to restart the computer to start the service.
0
 
LVL 3

Expert Comment

by:zahaby
ID: 12740576
thx very much
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question