T
TJS
Newbie
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).
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.
Script updated 5/6/06
--------------------------------------------------
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
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.
Script updated 5/6/06