Code: Selecteer alles
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process WHERE Name = 'spotnet.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Als je nu Spotnetafsluiten.vbs opstart vanaf je bureaublad zal hij spotnet volledig afsluiten.