Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[COLOR=blue]oManager = GETOBJECT([winmgmts:])
oApps = oManager.InstancesOf([Win32_process])
CREATE CURSOR TEMP (name C(20))
FOR EACH PROCESS IN oApps
[tab]INSERT INTO TEMP (name) VALUES (LOWER(PROCESS.name))
NEXT
BROW
cQuery = [select * from win32_process where name='winword.exe']
oResult = oManager.ExecQuery(cQuery)
FOR EACH oProcess IN oResult
[tab]oProcess.Terminate(0)
NEXT[/color]
Where did you get the "winmgmts:" name from?
[COLOR=blue]LOCAL llQuit[COLOR=green]
*!* Check for instance(s) of Myapp running[/color]
oManager = GETOBJECT([winmgmts:])
cQuery = [select * from win32_process where name='myapp.exe']
oResult = oManager.ExecQuery(cQuery)
IF oResult.Count > 1
[tab]llQuit = .T.
ENDI[COLOR=green]
*!* Clean up[/color]
oManager = .NULL.
oResult = .NULL.
RELEASE cQuery, oResult, oManager
IF llQuit[COLOR=green] && Myapp.exe running twice[/color]
[tab]QUIT
ENDI[/color]