Results 1 to 3 of 3

Thread: How to create user-defined service on Windows XP

  1. #1
    Join Date
    Mar 2009
    Posts
    176

    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?

  2. #2
    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.

  3. #3
    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:
    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

Similar Threads

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •