public sealed record ServiceSnapshot : IEquatable<ServiceSnapshot> Configuration and status read from Windows. BinaryCommandLine includes arguments.
Constructors
ServiceSnapshot
public ServiceSnapshot(string Name, string DisplayName, string BinaryCommandLine, string AccountName, ImmutableArray<string> Dependencies, ServiceStartMode StartMode, uint NativeServiceType, uint NativeErrorControl, string LoadOrderGroup, string Description, bool DelayedAutomaticStart, ServiceFailurePolicy FailurePolicy, ServiceStatus Status) Configuration and status read from Windows. BinaryCommandLine includes arguments.
Properties
AccountName
public string AccountName { get; init; } No documentation.
BinaryCommandLine
public string BinaryCommandLine { get; init; } No documentation.
DelayedAutomaticStart
public bool DelayedAutomaticStart { get; init; } No documentation.
Description
public string Description { get; init; } No documentation.
DisplayName
public string DisplayName { get; init; } No documentation.
ExecutablePath
public string ExecutablePath { get; init; } The executable of ServiceSnapshot.BinaryCommandLine, without quotes and arguments, as the Service Control Manager parses it.
Remarks
A quoted path is taken as written. For an unquoted path with spaces, such as C:\Program Files\App\svc.exe -k, the SCM starts the first prefix that exists as a file, trying C:\Program.exe first; on the local computer this property is found the same way. On a remote computer, or when no prefix exists, it is the shortest prefix ending in .exe, otherwise the first word. Environment references such as %SystemRoot% are kept; empty when the command line is empty.
LoadOrderGroup
public string LoadOrderGroup { get; init; } No documentation.
Name
public string Name { get; init; } No documentation.
NativeErrorControl
public uint NativeErrorControl { get; init; } No documentation.
NativeServiceType
public uint NativeServiceType { get; init; } No documentation.