I am currently doing this below which sets the Services Pipe value as a DWord file in the registry however I am looking to only increase the timeout for a single service through the registry.
servicesPipeTimeout.SetValue("ServicesPipeTimeout", 300000, RegistryValueKind.DWord);
CodePudding user response:
If this is for your own service, you should call the api method for requesting additional time in class ServiceBase
:
void RequestAdditionalTime(int milliseconds)
You can call this method in OnContinue, OnPause, OnStart and OnStop in case you need more time.