• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

[VB6]Terminating a Process by name

Finsta

Gawd
Joined
Oct 9, 2003
Messages
707
I want to terminate a process by name. Specifically, Steam which tends not be nice when loading up. Any suggestions? The Steam installer launches Steam, which I want to close instantly because there has to be some things to be done before it loads. Any suggestions or ideas?
 
It's really easy to code that in VBscript.

This code snippet is from the Script Center section on Microsoft Technet. It's from one of the daily "Hey, Scripting Guy!" howto's in thier archive . Just change "notepad.exe" to whatever executable you want to kill (as long as your user has sufficient rights to kill it).

Save below text into a file with a ".vbs" extension.

strComputer = "."
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'Notepad.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
 
Back
Top