Is it possible to enable the windows messenger service (famous net send) with a vb .net code??
I suppose the answer is yes!
Can you explin me how to do it? If possible, remotly! :p
Printable View
Is it possible to enable the windows messenger service (famous net send) with a vb .net code??
I suppose the answer is yes!
Can you explin me how to do it? If possible, remotly! :p
You can use the ServiceController class in order to start and stop services. An example of starting the "Themes" service is below:
Just need to replace "Themes" with the service that it is...VB Code:
Dim MyController As New System.ServiceProcess.ServiceController("Themes") If MyController.Status = ServiceProcess.ServiceControllerStatus.Stopped Then MyController.Start() MsgBox("successfully started!") Else MsgBox("Its already started!") End If
**Note - this does not take into account any error handling if there are problems with trying to start or stop
Thank u very much! The code has worked!
Is there any way to make the same thing but remotly (in a LAN)??
well if you look at the ServiceController class, you will see that there is another overloaded constructor that accepts the machine name as a parameter (i think If I remember correctly), and I believe that you just tack it on after the service name, like:
VB Code:
Dim MyController As New System.ServiceProcess.ServiceController("Themes", MachineName)
OK Thank you very much!
I'll try that!
So, to terminate the project I need to have a list of network computers (LAN)
http://www.vbforums.com/showthread.php?t=392041
Can you help me?