You need to look for the process that runs your web page, e.g. like so:
1. @echo off
2. start /b "Explorer" "C:\Program Files\Internet Explorer\iexplore.exe"
www.google.com
3. ping localhost -n 60 > nul
4. for /F "tokens=2" %%a in ('tasklist /v ^| find /i "google"') do set
PID=%%a
5. if not "%PID%"=="" (
6. echo Killing process %PID%
7. taskkill /pid %PID%
8. )
"John" <> wrote in message
news:5DE044A0-A3D8-4991-969F-...
> Hi Pegasus
>
> Thank you for the fast response, but how do I know what PID is associated
> to
> that specific process?
>
> Do you know other methods or tools to do this?
>
> "Pegasus [MVP]" wrote:
>
>>
>> "John" <> wrote in message
>> news:E828E848-23AC-4A21-8ED6-...
>> > Hello everyone,
>> >
>> > Does anyone knows how to script IE or other existing browsers in a
>> > given
>> > server?
>> >
>> > Here's What I'm trying to:
>> > I have a schedule tasks that runs every 2 min, in that batch there're
>> > some
>> > things to do, and if one of those things fail, it writes the results to
>> > a
>> > log
>> > and additionally I would like to open a URL that will trigger another
>> > action
>> > in a remote server.
>> >
>> > I already used the "start Iexplore.exe
>> > www.something.com/fgfgfgfgfjjjhk/..."
>> > the problem is that once the IE is open it stays open, and every time
>> > that
>> > the command "start Iexplore.exe www.something.com/fgfgfgfgfjjjhk/..."
>> > is
>> > called from the batch file, it opens a new window!!!
>> >
>> > Does anyone has a alternative solution to me needs? It doesn't have to
>> > be
>> > the Iexplore.exe, I could use any other tool that allows me to call a
>> > URL
>> > and
>> > after a given time that URL should be closed.
>> >
>> >
>> > Thank you for your time.
>>
>> A crude but effective method would be to use taskkill.exe to kill
>> iexplore.exe 60 seconds after you've launched it.
>>
>>
>>