|
-
Mar 11th, 2006, 12:35 PM
#1
Thread Starter
Junior Member
Enabling the windows messenger service
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!
-
Mar 11th, 2006, 12:53 PM
#2
Re: Enabling the windows messenger service
You can use the ServiceController class in order to start and stop services. An example of starting the "Themes" service is below:
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
Just need to replace "Themes" with the service that it is...
**Note - this does not take into account any error handling if there are problems with trying to start or stop
-
Mar 11th, 2006, 12:57 PM
#3
Thread Starter
Junior Member
Re: Enabling the windows messenger service
Thank u very much! The code has worked!
Is there any way to make the same thing but remotly (in a LAN)??
-
Mar 11th, 2006, 01:06 PM
#4
Re: Enabling the windows messenger service
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)
-
Mar 11th, 2006, 03:21 PM
#5
Thread Starter
Junior Member
Re: Enabling the windows messenger service
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|