Господа, помогите пожалуйста установить сабж, средсвами C# .NET. Лучше всего второе. Не могу найти класс/компонент. Нужно что-то типа:
string serviceName = "<service_name>";
System.Runtime.SystemWorks sysworks = new System.Runtime.SystemWorks( LOCAL_SYSTEM_ID );
if( sysworks.GetServiceStatus( serviceName ) == PROCESS_IS_STARTED )
{
//some action
}
else
{
//some other actions
}
Logger.PostLine( "Thank you for a help, dear RSDN members!" );
Logger.PostLine( "Thank you for a help, dear RSDN members!" );
А так не катит:
Initializes a new instance of the ServiceController class that is associated with an existing service on the local computer.
public ServiceController(string);
Initializes a new instance of the ServiceController class that is associated with an existing service on the specified computer.
public ServiceController(string, string);
"NikitaY" <forum@rsdn.ru> wrote in message
news:467528@news.rsdn.ru...
> Господа, помогите пожалуйста установить сабж, средсвами C# .NET. Лучше всего второе. Не могу найти класс/компонент. Нужно что-то типа:
>
> > string serviceName = "<service_name>";
> System.Runtime.SystemWorks sysworks = new System.Runtime.SystemWorks( LOCAL_SYSTEM_ID );
>
> if( sysworks.GetServiceStatus( serviceName ) == PROCESS_IS_STARTED )
> {
> //some action
> }
> else
> {
> //some other actions
> }
>
> Logger.PostLine( "Thank you for a help, dear RSDN members!" );
>
>
> Logger.PostLine( "Thank you for a help, dear RSDN members!" );
>
> 
Posted via RSDN NNTP Server 1.7 "Bedlam"
Скорее всего он то мне и нужен был.
Спасибо.