次の方法で共有


Service Data

This resource is required for components that define a Windows service.

The following extended properties can be set for the Service Data resource in Component Designer or Target Designer.

  • ComponentVSGUID

    Type Required or optional
    GUID Not applicable

    Reserved for Microsoft.

  • Dependencies

    Type Required or optional
    Multistring Optional

    Includes names of services or load ordering groups that the system must start before this service. Dependency on a group means that this service can run if at least one member of the group is running after an attempt to start all members of the group. A group string must be prefixed with a plus (+), for example, +NetBIOSGroup, RpcSS.

  • ErrorControl

    Type Required or optional
    Integer Required

    Specifies the severity of the error if this service fails to start during system startup, and determines the action taken if failure occurs.

    • SERVICE_ERROR_IGNORE = 0

      The startup program logs the error but continues the startup operation.

    • SERVICE_ERROR_NORMAL = 1

      The startup program logs the error and displays a message box but continues the startup operation.

    • SERVICE_ERROR_SEVERE = 2

      The startup program logs the error. If the last-known valid configuration is being started, the startup operation continues. Otherwise, the system is restarted with the last-known valid configuration.

    • SERVICE_ERROR_CRITICAL = 3

      The startup program logs the error, if possible. If the last-known valid configuration is being started, the startup operation fails. Otherwise, the system is restarted with the last-known valid configuration.

  • LoadOrderGroup

    Type Required or optional
    String Optional

    Name of the load ordering group of which this service is a member. If not specified then the service does not belong to a load ordering group.

  • Password

    Type Required or optional
    String Optional

    Contains the password to the account name specified by the StartName property. Leave blank if the account has no password or if the service runs in the LocalService, NetworkService, or LocalSystem account. Ignored for driver services.

  • ServiceBinary

    Type Required or optional
    String Required

    Path to the executable file for the service. Note the following guidelines:

    • Use environment variables in path names. For more information, see Predefined System Environment Variables.
    • You do not need to use quotation marks to enclose spaces in the file path.
    • You can include additional arguments to your executable file following the executable name.
    • Do not use hardcoded values for any files you reference in your argument files. You do not have to supply the full path for the files in your argument as long as they are found in the search path on the run-time image. If you have an .inf file that defines your service, this string can be the identical string you have in your .inf file.
  • ServiceDescription

    Type Required or optional
    String Optional

    Specifies the text that describes the service. If you are using text in your .inf file, use the same text here.

  • ServiceDisplayName

    Type Required or optional
    String Optional

    Specifies the text that is displayed to the user as the name of the service. If you are using text in your .inf file, use the same text here.

  • ServiceName

    Type Required or optional
    String Required

    Uniquely identifies your service. This is the service key name that is recorded in the registry for this service, and the other parameters are written under this key for the service. The Windows XP service control manager database preserves the case of the characters, but service name comparisons are always case insensitive. Forward-slash (/) and back-slash (\) are not valid service name characters.

  • ServiceType

    Type Required or optional
    Integer Required

    Type of the service. This is a value derived by combining the following masks using the OR operator:

    • SERVICE_WIN32_OWN_PROCESS = 16

      (0x00000010) Specifies a service that runs in its own process.

    • SERVICE_WIN32_SHARE_PROCESS = 32

      (=0x00000020) Specifies a service that shares a process with other services.

      **Note   **If you specify SERVICE_WIN32_OWN_PROCESS or SERVICE_WIN32_SHARE_PROCESS, you can also specify the type.

    • SERVICE_KERNEL_DRIVER = 1

      (=0x00000001) Specifies a driver service.

    • SERVICE_FILE_SYSTEM_DRIVER = 2

      (=0x00000002) Specifies a file system driver service.

    • SERVICE_INTERACTIVE_PROCESS = 256

      (=0x00000100) Enables a service to interact with the desktop.

  • StartName

    Type Required or optional
    String Optional

    Name of the account under which the service is to be run. If the service type is SERVICE_WIN32_OWN_PROCESS, use an account name in the form <DomainName>\<UserName>. The service process is logged on as this user. If the account belongs to the built-in domain, you can specify .\<UserName>.

    If this parameter is not specified, the service is started under the LocalSystem account. If ServiceType specifies SERVICE_INTERACTIVE_PROCESS, the service must run in the LocalSystem account.

    If this property is set to NT AUTHORITY\LocalService, the LocalService account is used. If you specify NT AUTHORITY\NetworkService, the NetworkService account is used.

  • StartType

    Type Required or optional
    Integer Required

    Specifies when the service should start.

    • SERVICE_BOOT_START = 0

      Indicates a driver started by the OS loader. This value should be used only for drivers or devices required for loading the OS.

    • SERVICE_SYSTEM_START = 1

      Indicates a driver started during OS initialization.

    • (SERVICE_AUTO_START = 2

      Indicates a driver or service started on demand, either by the Plug and Play Manager when the corresponding device is enumerated or by the Service Control Manager in response to an explicit user demand.

    • SERVICE_DEMAND_START = 3

      A service started by the service control manager when a process calls the Win32 StartService function.

    • SERVICE_DISABLED = 4

      Indicates a driver or service that cannot be started.

These values correspond to the parameters passed to the CreateService function, although CreateService is not actually used to process this resource type.

See Also

Custom Resources

Last updated on Wednesday, October 18, 2006

© 2006 Microsoft Corporation. All rights reserved.