>Hugo,
>
>That's the trick I needed. I worked great. As far as I know, this is the only 16-bit app on the workstations but I will do some more testing. Likewise, I just found this reference that seems to imply you can kill individual applications using a DLL named VDMDBG.dll.
>
>
http://msdn.microsoft.com/en-us/library/aa287954(VS.71).aspx>
>Thanks for everyone's help ... this will allow me to continue to develop the "kludge" of a solution that I'm working on.
>
>Robert
>
>
>>You could kill Ntvdm.exe if you are absolutely sure there is only one instance of it and it is running your db application, ie, you are not running any other 16 bits applicattion.
>
>>Robert
Maybe you could try something like the following. I have seen non-printable (and non-displayable) characters that LOOK like a space all too often. You could modify that function above with this to strip out "unknown" characters. All that's left of the process name is A-Z, 0-9 and a couple normal punctuation marks.
lcMyProcess = "WOWEXEC.EXE"
loProcesses = loWMI.ExecQuery([SELECT * FROM Win32_Process])
llIsRunning = .F.
IF loProcesses.Count > 0
FOR EACH loProcess in loProcesses
lcProcessName = upper(loProcess.Name)
lcProcessName = chrtran(chrtran(lcProcessName,'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._-&',''),'')
IF lcProcessName == lcMyProcess and llTerminate
llIsRunning = .T.
loProcess.Terminate(0)
ENDIF
ENDFOR
ENDIF
Hope this works or helps spark an idea.
John White [MOST]