MS Server

ID #1065

Wie erstelle ich einen Windowsdienst manuell?

At a MS-DOS command prompt(running CMD.EXE), type the following command:

path\INSTSRV.EXE My Service path\SRVANY.EXE

where path is the drive and directory of the Windows NT Resource Kit (i.e., C:\RESKIT) and My Service is the name of the service you are creating.

Example:
C:\Program Files\Resource Kit\Instsrv.exe Notepad C:\Program Files\Resource Kit\Srvany.exe
NOTE: To verify that the service was created correctly, check the registry to verify that the ImagePath value under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\service name
is set to point to SRVANY.EXE. If this is not set correctly, the service will stop shortly after it starts and return an Event ID 7000 "The service name failed to start."

REGEDIT

  1. Run Registry Editor (Regedt32.exe)and locate the following subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<My Service>

    From the Edit menu, click Add (NEW) Key. Type the following and click OK:
    Key Name: Parameters
    Class : <leave blank>
  2. Select the Parameters key.
    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 executable including the extension (i.e., C:\WinNT\Notepad.exe)
  3. Close Registry Editor.
Kategorien zu diesem Artikel

Tags: -

Verwandte Artikel:

Letzte Änderung des Artikels: 2010-02-05 12:35
Verfasser des Artikels: Pascal Buehler
Revision: 1.0

Digg it! Artikel ausdrucken Artikel weiterempfehlen Als PDF-Datei anzeigen
Übersetzungsvorschlag für Übersetzungsvorschlag für
Bewertung der Nützlichkeit dieses Artikels:

Durchschnittliche Bewertung: 0 von 5 (0 Bewertungen)

vollkommen überflüssig 1 2 3 4 5 sehr wertvoll

Kommentieren nicht möglich