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
2010-06-16 11:01:07
+1
A:
You can use the ServiceController
class for this. There are code samples in the linked documentation page.
Fredrik Mörk
2010-06-16 11:20:03
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
2010-06-16 11:32:31
+2
A:
ServiceController _ServiceController = new ServiceController([NameService]);
if (_ServiceController.ServiceHandle != null)
{
_ServiceController.Stop();
_ServiceController.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromMilliseconds(uConstante.CtTempoEsperaRespostaServico));
}
Ph.E
2010-06-16 11:37:06