Set WshShell = WScript.CreateObject("WScript.Shell")
set oShell = CreateObject("Shell.Application")

strSamPath = WshShell.RegRead ("HKCU\Software\Serious Samurize\")

SAMURIZE_DIRECTORY = strSamPath

KillClient

Wscript.sleep (100)

Set oExec = Nothing
Set WshShell = Nothing



Function KillClient
  Dim objWMIService, colProcessList, objProcess, PID
    Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
    Set colProcessList = objWMIService.ExecQuery("select * from Win32_Process where CommandLine LIKE '%Client.exe%" & "SuiteArt" & "%'")
    For Each objProcess in colProcessList
      PID = objProcess.ProcessID
      killPID(PID)
    Next
End Function

Function killPID(PID)
  Dim WshShell
  Set WshShell = CreateObject("wscript.shell")
  WshShell.run "taskkill /PID " & PID, 0
End Function
