Hi NG,
Here some Code:
------------------------------------------------------
Public Class Form1
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim myPath As Management.Mana gementPath = New Management.Mana gementPath
myPath.Server = System.Environm ent.MachineName
myPath.Namespac ePath = "root\CIMV2 "
myPath.Relative Path = "Win32_Service. Name='Messenger '"
Dim myService As Management.Mana gementObject = New
Management.Mana gementObject(my Path)
Dim myvalue As String = "Testit"
MsgBox(myServic e.GetPropertyVa lue("DisplayNam e"))
myService.SetPr opertyValue("Di splayName", myvalue)
myService.Put()
MsgBox(myServic e.GetPropertyVa lue("DisplayNam e"))
End Sub
End Class
-------------------------------------------------------
The first msgbox shows the initial value and the second shows the new value
.... but in services.msc nothing changes ...
have tried anything ... also can't bring the .invokemethod(" change",args) to
work ...
Anyone an idea ?
Thx & greetings