Preventing multiple instances of a Windows app - still a problem

Mark Schonewille m.schonewille at economy-x-talk.com
Sun Dec 4 10:19:15 EST 2011


What's wrong with relaunch?

--
Kind regards,

Mark Schonewille
Economy-x-Talk
Http://economy-x-talk.com

Share the clipboard of your computer over a local network with Clipboard Link http://clipboardlink.economy-x-talk.com


Op 4 dec. 2011 om 16:01 heeft Mike Bonner <bonnmike at gmail.com> het volgende geschreven:

> Since you just want to kill the process, and not necessarily bring it to
> the front or anything like that, I think this is great advice. Just kill it
> through shell, shouldn't matter if its actually running or not.
> 
> However, on the vbscript side I found a MUCH easier way to see if the
> process is running.
> 
> Do the following as vbscript. (can run it direct, no need for a tmp file or
> anything)
> 
> Set colProcessList = GetObject("Winmgmts:").ExecQuery ("Select * from
> Win32_Process WHERE Name = 'System Idle Process'")
> result = colProcessList.Count
> 
> If the result is > 0 the process is running. Note the single quotes around
> my process name.
> 
> 
> 
> 
>> Did you tried this way:
>> 
>> 1)
>>  get "tasklist /NH /FI  " & quote & "IMAGENAME eq firefox.exe"  & quote
>>  put shell( IT )
>>  -- or process the shell() output
>> 
>> 2)
>>  get "tasklist /NH /FI  " & quote & "IMAGENAME eq Troubling\ App.exe"  &
>> quote
>>  put shell( IT )
>> 
>> 
>> Solution 1, I'm sure it works
>> Solution 2, didn't test it.
>> 
>> HTH,
>> 
>> Thierry
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list