Hi, Is there a way to change the properties on an already existing service with ..NET. I know that the ServiceController class can be used to perform administrative tasks such as starting or stopping a service but a need to change the properties of an already existing service: The properties are the following 1. The Startup type 2. The Log On 3. The Recovery: First failure, second failure, Subsequent failures These properties can probably changed when you create a Service from scratch with the .NET framework but in my case, the service has been written by someone else with another development environment (Delphi). Mastermo Thanks.
Mohamed Ben wrote: > Hi, > > Is there a way to change the properties on an already existing service with > .NET. I know that the ServiceController class can be used to perform > administrative tasks such as starting or stopping a service but a need to > change the properties of an already existing service: The properties are > the following > > 1. The Startup type > 2. The Log On > 3. The Recovery: First failure, second failure, Subsequent failures > > These properties can probably changed when you create a Service from scratch > with the .NET framework but in my case, the service has been written by > someone else with another development environment (Delphi). > > Mastermo > > Thanks. Framework has some nice classes for reading/writing the registry. This is where the settings you mention are stored. Take a peek. - Lee
Thanks, In Windows XP these settings seem to be under. HKEY_LOCAL_MACHINE\System\CurrentControlSetServices. I just have to check that there are at the same location with Window 2000, 2000 Server, 2003 Server. Mastermo "Lee Gillie" wrote in message news:%23ObMxbicFHA.2792@TK2MSFTNGP10.phx.gbl... > Mohamed Ben wrote: > > Hi, > > > > Is there a way to change the properties on an already existing service with > > .NET. I know that the ServiceController class can be used to perform > > administrative tasks such as starting or stopping a service but a need to > > change the properties of an already existing service: The properties are > > the following > > > > 1. The Startup type > > 2. The Log On > > 3. The Recovery: First failure, second failure, Subsequent failures > > > > These properties can probably changed when you create a Service from scratch > > with the .NET framework but in my case, the service has been written by > > someone else with another development environment (Delphi). > > > > Mastermo > > > > Thanks. > > Framework has some nice classes for reading/writing the registry. This > is where the settings you mention are stored. Take a peek. > > - Lee