I was trying to open and close an application. I tried like this:
Dim App1 Set App1 = CreateObject(\"WScript.Shell\") App1.Run(\"firefox\") App1.Quit
If you want to be able to terminate a process that way you need to use the Exec method instead of the Run method.
Exec
Run
Set ff = CreateObject("WScript.Shell").Exec("firefox") 'you do stuff ff.Terminate