Solved

how do i create a windows service

Posted on 2003-10-27
9
193 Views
Last Modified: 2010-04-14
hi i want a program to run as a service, how do i do that? thanks
0
Comment
Question by:bens2333
  • 4
9 Comments
 
LVL 19

Accepted Solution

by:
Dexstar earned 50 total points
ID: 9629716
bens2333:

> hi i want a program to run as a service, how do i do that? thanks

Use this program:
      http://www.firedaemon.com/

Hope that helps,
Dex*
0
 

Author Comment

by:bens2333
ID: 9629817
Dex,
that helps, but i was hoping for a way to do it without a third party tool. Is there a windows or dosish way to make something run as a service?
0
 
LVL 19

Expert Comment

by:Dexstar
ID: 9629834
bens2333,

There is another tool in the NT Resource Kit that lets you do it.  I don't know if you consider that "3rd party" because it does come from Microsoft, but it doesn't come with Windows.  But without a utility program like that, there isn't a way to do it, unless you write the application yourself and write it to be a service.

Dex*
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 5

Assisted Solution

by:juliancrawford
juliancrawford earned 50 total points
ID: 9629871
The best tool to use comes from the resource kit - srvany.exe
With Srvany, you can configure any Windows application so that it runs as a service.

or you can directly edit the registry to the same effect ..
To specify an application to run as a service, you must use a registry editor to add information to the Windows registry.

Starting a Registry Editor
Click the Start button, and then click Run.
In the Open box, type regedt32, and click OK.

Starting an Application as a Service
Add a new Parameters subkey in the following registry location:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyService\ <-----creates a service called MyService
In the new Parameters subkey, create an:
Application entry with a data type of REG_SZ,
specify the full path of the executable file for the application (including the extension). For example:
Application: REG_SZ: D:\Tools\Vi.exe

:)
0
 
LVL 19

Expert Comment

by:Dexstar
ID: 9847654
What do you do with questions where the Asker isn't happy with the answer, not because it was wrong, but because it isn't the answer they wanted to hear?

Dex*
0
 
LVL 19

Expert Comment

by:Dexstar
ID: 10044532
I suggest a split between myself and juliancrawford ... I made the original suggestion, and juliancrawford gave more details.

Dex*
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now