Kill Bbclient.exe

TJS

Newbie
[OP]
Regulars
May 12, 2006
57
0
Edit: Use AHK Compiled Script (KillSBC) to start BBClient instead of VBScript.
--------------------------------------------------
1. KillSBC
See Post #25

2. How to Logout ?
See Post #22, #23

3. KeepAlive
See Post #27
=============================

1. Copy this code (change the path of BBClient.exe if different) to notepad and save it as .vbs file (say, BBClient.vbs).

Code:
strComputer = "."Set objWMIService = GetObject("winmgmts:" _    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")StartProg "C:\Program Files\Sify Broadband\BBClient.exe"Do ProAv = CheckAv("HBSbeat.exe") If ProAv ThenExit DoElseIf CheckAv("BBClient.exe") = False ThenWScript.QuitEnd If Loop While ProAv = FalseSet colNamedArguments = WScript.Arguments.NamedsTime = colNamedArguments.Item("Sleep")WScript.Sleep sTimeKillProcess "BBClient.exe"KillProcess "HBSbeat.exe"KillProcess "BBImpSec.exe"Sub StartProg(strPath)Const NORMAL_WINDOW = 5Set objStartup = objWMIService.Get("Win32_ProcessStartup")Set objConfig = objStartup.SpawnInstance_objConfig.ShowWindow = NORMAL_WINDOWSet objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")errReturn = objProcess.Create _(strPath, null, objConfig, intProcessID)End SubSub KillProcess(ProcessName)Set colProcessList = objWMIService.ExecQuery _    ("Select * from Win32_Process Where Name ='" & ProcessName & "'")For Each objProcess in colProcessList    objProcess.Terminate()NextEnd SubFunction CheckAv(ProcessName)Set colProcesses = objWMIService.ExecQuery _    ("Select * from Win32_Process Where Name = '" & ProcessName & "'")If colProcesses.Count Then    CheckAv = TrueElse   CheckAv = FalseEnd IfEnd Function
2. Create shortcut to BBClient.vbs.

3. Right click BBClient.vbs shortcut > Properties.

4. Add argument /Sleep:5000 in target path.

http://imageshack.us

Now when you double-click BBClient.vbs shortcut, it will launch bbclient.exe and will terminate it automatically after 5 seconds. :D

Script updated 5/6/06
 

TJS

Newbie
[OP]
Regulars
May 12, 2006
57
0
Terminating bbclient.exe won't kill your log on session.

Well, the idea here is - login and kill bbclient.exe using same script.

When you double-click BBClient.vbs shortcut it will launch bbclient.exe (login now) and then it will kill bbclient.exe automatically after 5 s to free up system resources.

If you just want to kill bbclient.exe process then use this code

Code:
strComputer = "."Set objWMIService = GetObject("winmgmts:" _    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colProcessList = objWMIService.ExecQuery _    ("Select * from Win32_Process Where Name = 'bbclient.exe'")For Each objProcess in colProcessList    objProcess.Terminate()Next
 


TJS

Newbie
[OP]
Regulars
May 12, 2006
57
0
Thanks.Script modified to kill BBImpSec.exe. So memory usage after login = memory usage before login :D
 

popcorn

Senior Member
Apr 10, 2005
3,105
74
Mumbai
i saw my mem usage of bbclient.exe.... its just 972 KB
 


Dukes Mangola

Regular
Regulars
Feb 9, 2006
175
0
wow, thanks TJS! Supersify hasnt been working here for a couple of months now, so this rocks! The only problem is that I'll still need to login via bbclient.exe sometimes to check my session details if I'm downloading a lot of stuff during the day... Does anyone know any easier ways of checking on the session details ?Sorry for the double posting.But, stupid question time: How do I log out ? :p