tags:

views:

54

answers:

4

Because of VLC conflict I have to turn off Windows Advanced Text Services at my application launch. Is there any special API for that? Will it work for user with default rights?

A: 

You can use WMI for that.

Look here, for example: http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=114

Pavel Radzivilovsky
+1  A: 

You can use the ServiceController class for this. There are code samples in the linked documentation page.

Fredrik Mörk
A: 

just execute "net stop service-name" to stop a service or "net start service-name" to start a service. type "net start" in the console (cmd.exe) in order to list all services.

You need admin privileges in order to enable/disable services.

pixar
+2  A: 
ServiceController _ServiceController = new ServiceController([NameService]);
if (_ServiceController.ServiceHandle != null) 
{
     _ServiceController.Stop();
     _ServiceController.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromMilliseconds(uConstante.CtTempoEsperaRespostaServico));
}
Ph.E