>Larry,
>
>I can't get the code to work. No window is open. The only visible evidence of the app running is in the Task Manager, processes tab, AcroDist.exe.
Steven,
If you have the Visual Studio, Spy++ came with it as an option installation. You can take a look and see if Acrodist creates a hidden window and use its caption or window class in the FindWindow function. If you don't have that utility, get File#
9908. George Tasker created a VFP version to enumerate windows.
If those don't work for you and you are using Windows 2000 or XP, then you can use the Windows Management Instrumentation (WMI) to do this.
local loloc, lomgr, loproccol, loproc
loloc = createobject('WBemScripting.SWbemLocator')
lomgr = loloc.ConnectServer()
loproccol = lomgr.InstancesOf('Win32_Process')
for each loproc in loproccol
if upper(loProc.Properties_("ProcessID").Value) = 'ACRODIST.EXE' then
loproc.Terminate()
endif
next
store .NULL. to loproccol, lomgr, loloc
WMI is part of Win2k/XP/ME but you can get the download if you want it for NT/9X. See Message#
711421 for a link.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao