From: Leon on 26 Jul 2010 08:54 Hi WI want to find the rigth IEproces and kille it. What I have is the Window Title of the IE window from followíng code ******************************************************************************************* set oShell= createobject("shell.application") on error resume next for each oWin in oShell.windows do qIE= cbool(instr(lcase(typename(oWin.document)),"htmldocument")) if err then exit do if qIE then sTitle= oWin.document.title: if err then exit do if trim(sTitle)= "" then sTitle= oWin.locationurl: if err then exit do end if wscript.echo sTitle end if loop until true: err.clear next on error goto 0 ******************************************************************************************* I want to look for the rigt windows title in the loop trough the IE windows and when found find the associated PID and then kill it How do I do that? Best regards
From: Mayayana on 28 Jul 2010 09:06 I want to look for the rigt windows title in the loop trough the IE windows and when found find the associated PID and then kill it How do I do that? ---------------------------- You don't need the PID. Just do oWin.Quit. (That works for me on XP running IE6 without restrictions. I assume it works on Vista/7 as long as you started the process, but one can never assume anything just works when it comes to IE 7/8.)
From: Leon on 28 Jul 2010 10:47 That was fairly simple.. I'm not familiar with all methods and properties. New area for me Thanks On 28 Jul., 15:06, "Mayayana" <mayay...(a)invalid.nospam> wrote: > I want to look for the rigt windows title in the loop trough the IE > windows and > when found find the associated PID and then kill it > > How do I do that? > ---------------------------- > > You don't need the PID. Just do oWin.Quit. > (That works for me on XP running IE6 without > restrictions. I assume it works on Vista/7 > as long as you started the process, but one > can never assume anything just works when > it comes to IE 7/8.)
|
Pages: 1 Prev: Addressing special folders. Next: newb how to make login script |