Always ,issue quit to end the current Visual FoxPro session and returns control to the operating system.
Very important: If you turn the computer off without issuing QUIT, open files might become damaged and data lost, and temporary work files that would normally be deleted may be left on disk.
the WMI code is absolutely similar to DOS taskKill (it ends a process or task as you make manually in the windows taskmanager).
-application example
local oshell
oshell = CREATEOBJECT('WScript.Shell')
oshell.Run("taskKill /f /im yourVFP.exe", 0)
oshell=null
can make same code with API shellexecute