Go Back   TechArena Community > Software > Operating Systems
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to create user-defined service on Windows XP

Operating Systems


Reply
 
Thread Tools Search this Thread
  #1  
Old 31-07-2009
Member
 
Join Date: Mar 2009
Posts: 175
How to create user-defined service on Windows XP
  

I am using Windows XP on my laptop. I would like to create a new service which can be used in Windows. But I don't know how to do so in Windows XP. Can you help me how can I create a user-defined service on my Windows XP laptop?

Reply With Quote
  #2  
Old 31-07-2009
Member
 
Join Date: May 2008
Posts: 859
Re: How to create user-defined service on Windows XP

The Windows Server 2003 Resource Kit provides two utilities that allow you to create a user-defined service for Windows applications. Instrsrv.exe installs and removes system services and Srvany.exe allows any Windows application to run as a service.

To create a user-defined service, perform the following steps:

1. At the command prompt, type the following command:

Code:
path\INSTSRV.EXE My Service path\SRVANY.EXE
where path is the drive and directory of the Windows Server 2003 Resource Kit and My Service is the name of the service you are creating.

2. Run Registry Editor and navigate to the following subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<My Service>

3. From the Edit menu, click Add Key. Type the following and click OK:

Key Name: Parameters
Class : <leave blank>

4. Select the Parameters key.

5. From the Edit menu, click Add Value. Type the following and click OK:

Value Name: Application
Data Type : REG_SZ
String : <path>\<application.ext>

where <path>\<application.ext> is the drive and full path to the application's executable including the extension

6. Close Registry Editor.
Reply With Quote
  #3  
Old 31-07-2009
Member
 
Join Date: May 2008
Posts: 962
Re: How to create user-defined service on Windows XP

You can even use sc.exe command.

SC is a command line program used for communicating with the NT Service Controller and services.

Syntax:
Quote:
sc <server> [command] [service name] <option1> <option2>...
SC Commands:

query-----------Queries the status for a service, or enumerates the status for types of services.
queryex---------Queries the extended status for a service, or enumerates the status for types of services.
start-----------Starts a service.
pause-----------Sends a PAUSE control request to a service.
interrogate-----Sends an INTERROGATE control request to a service.
continue--------Sends a CONTINUE control request to a service.
stop------------Sends a STOP request to a service.
config----------Changes the configuration of a service (persistant).
description-----Changes the description of a service.
failure---------Changes the actions taken by a service upon failure.
qc--------------Queries the configuration information for a service.
qdescription----Queries the description for a service.
qfailure--------Queries the actions taken by a service upon failure.
delete----------Deletes a service (from the registry).
create----------Creates a service. (adds it to the registry).
control---------Sends a control to a service.
sdshow----------Displays a service's security descriptor.
sdset-----------Sets a service's security descriptor.
GetDisplayName--Gets the DisplayName for a service.
GetKeyName------Gets the ServiceKeyName for a service.
EnumDepend------Enumerates Service Dependencies.

To create a service, simply use

Code:
<path>\sc.exe create "Service Name" binPath= "C:\Your Program.exe"
command
Reply With Quote
Reply

  TechArena Community > Software > Operating Systems
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to create user-defined service on Windows XP"
Thread Thread Starter Forum Replies Last Post
What are user defined exceptions in Java? Migueel Software Development 5 30-11-2009 06:27 PM
end user defined characters Gunter Windows Software 4 13-07-2009 09:36 AM
Create user defined functions in Excel 2007 AbhayD Windows Software 3 24-06-2009 07:05 PM
When to create User Defined Data Type in VB.Net Nihar Khan Software Development 3 27-02-2009 10:29 AM
C# User defined function added in library but no error RadhaV Software Development 2 12-02-2009 06:04 PM


All times are GMT +5.5. The time now is 04:12 PM.