API Reference
Class
ServiceImagePathParser
Helpers for parsing Windows service ImagePath command lines stored in the registry. Splits the raw value into an executable path and the remaining arguments, with optional environment-variable expansion. The logic is tolerant of quoted and unquoted forms.
Inheritance
- Object
- ServiceImagePathParser
Methods
public static ValueTuple<String, String> Split(String imagePath, Boolean expandEnv = true) #Returns:
ValueTuple<String, String>Split a service ImagePath string into executable path and arguments.
Parameters
- imagePath System.String
- Raw registry value from HKLM\SYSTEM\CurrentControlSet\Services\<Name>\ImagePath.
- expandEnv System.Boolean = true
- When true, expands environment variables (e.g., %SystemRoot%) in both parts.
Returns
Tuple where exePath is the resolved executable (may be null when input is null/empty) and args is the remaining command line (may be null/empty).
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object