rmatthew Posted January 20, 2003 Posted January 20, 2003 I need to start / stop a specific service from a program. Is there a way to accomplish this in Visual Basic.NET? Quote
Datahighway Posted January 22, 2003 Posted January 22, 2003 Hi rmatthew, have you a Solution for you Problem starting and stopping services ? I have the same Problem. I wrote a Windows Service, but i need a way to start und stop this service with a VB Programm. Quote
rmatthew Posted January 22, 2003 Author Posted January 22, 2003 Yes - Dim serv As New System.ServiceProcess.ServiceController("[sERVICE NAME AS STRING]") 'to Start serv.Start() 'to Stop serv.Stop() Quote
bungpeng Posted January 23, 2003 Posted January 23, 2003 System.ServiceProcess....? I can't find this class... Do I need to install other component? Quote
rmatthew Posted January 23, 2003 Author Posted January 23, 2003 Need to add a reference - System.ServiceProcess Quote
russgreen Posted September 28, 2003 Posted September 28, 2003 how would you get a service to restart itelf? Quote Learn Visual Studio .Net My Homepage
leontager Posted October 5, 2003 Posted October 5, 2003 this is what I used Dim sc As New System.ServiceProcess.ServiceController("Service Name") sc.Start() 'Will start it (permissions required) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.