Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Reloading IE (kiosk mode)

1 view
Skip to first unread message

KM

unread,
Apr 3, 2007, 8:20:01 PM4/3/07
to
Richard,

I am sure there is such software out there sold by 3rd parties. I will let others to comment here if they happened to know and use
the software.

But in case you've got Visual Studio or similar compiler installed you can easy create a watchdog app by yourself.
All you have to do is either:
- watch on the IE window by class name and if disappears, launch it back.
- launch your little app as the shell instead. The app will launch IE and wait for the signal from the IE process handle. When
IE exits, the app will get the event signal and can re-launch it again. This is similar to AutoRestartShell functionality.

--
=========
Regards,
KM


>I have an build that runs IE in kiosk mode. I'm looking for any freeware
> software that will automatiically reload IE if IE is closed down. I've heard
> there such software out there, but I haven't been able to find anything.
>
> Anyone have any suggestions?
>
> Richard


Mike Warren

unread,
Apr 3, 2007, 11:01:23 PM4/3/07
to
Richard Rosenheim wrote:

> I have an build that runs IE in kiosk mode. I'm looking for any
> freeware software that will automatiically reload IE if IE is closed
> down. I've heard there such software out there, but I haven't been
> able to find anything.
>
> Anyone have any suggestions?

I wrote a simple watchdog program for my own use that may help. I have
no idea if it works with IE but you are welcome to give it a go.

http://www.mike-warren.net/Watchdog.zip (50K)

Usage:
watchdog.exe <FullPathToProgram>

eg:
watchdog.exe C:\Windows\Notepad.exe

If the program path has spaces it needs to be enclosed in speech marks.

eg:
watchdog.exe "C:\Program With Spaces.exe"

--
-Mike

Richard Rosenheim

unread,
Apr 4, 2007, 6:08:04 PM4/4/07
to
Mike,

I do want to thank you for providing me with a copy of WatchDog.

Unfortunately, it doesn't appear to support command line switches following
the <FullPathToProgram> parameter. And, to invoke IE in kiosk mode, the use
of the "-k" switch is necessary.

Richard

Mike Warren

unread,
Apr 4, 2007, 7:11:50 PM4/4/07
to
Richard Rosenheim wrote:

> Unfortunately, it doesn't appear to support command line switches
> following the <FullPathToProgram> parameter. And, to invoke IE in
> kiosk mode, the use of the "-k" switch is necessary.

I didn't need command line support when I wrote it so I made it able to
watch several programs at once.

Since there have been quite a few downloads of it I decided to spend 10
minutes and add commandline support. This removes the multi-program
capability.

I made it a bit faster while I was at it. It is now set to restart the
watched program after about 2 seconds. Watchdog.exe runs at very low
priority (IDLE_PRIORITY_CLASS, THREAD_PRIORITY_IDLE) so may take a bit
longer on a busy machine.

http://www.mike-warren.net/Watchdog.zip (50K)

Usage:
watchdog.exe <FullPathToProgram> [Params]

eg:
watchdog.exe C:\Windows\Notepad.exe C:\ATextFile.txt

If the program path has spaces it needs to be enclosed in speech marks.

eg:
watchdog.exe "C:\Program With Spaces.exe"

It has a hidden window to allow posing posting WM_CLOSE to it.
Class name: STATIC
Window Name: Mike_Warren_Watchdog

--
-Mike

Richard Rosenheim

unread,
Apr 4, 2007, 7:32:02 PM4/4/07
to
Thanks for the making that change -- I will incorporate the new version of
Watchdog into my build.

I do have IE configured so that the user can't close it. So, in theory at
least, IE would never need to be reloaded. But, if IE would to every crash,
Watchdog will hopefully reload it (and avoid anyone having to actually
physically reboot the system).

Richard

KM

unread,
Apr 4, 2007, 7:34:39 PM4/4/07
to
Mike,

> I made it a bit faster while I was at it. It is now set to restart the
> watched program after about 2 seconds. Watchdog.exe runs at very low
> priority (IDLE_PRIORITY_CLASS, THREAD_PRIORITY_IDLE) so may take a bit
> longer on a busy machine.


Since you dug into the API calls here, a suggestion..

How are you watching on the processed being launched?
If you launch the process with CreateProcess or ShellExecute[Ex] then just don't close the process handle but wait until it (the
handle) signals back. Something like WaitForSingleObject(hProcess,INFINITE) will do it. If process handle signals, you can launch
the command line again (in a loop).
Assuming you didn't have any other logic implemented in that watchdog app, you wouldn't have to worry about the process or thread
priorities.

Also, typically for a watchdog app I don't implement window or window proc. There is no need to make such app heavier with the
window queue added. If you want to keep a way how to close the app, then just create a named mutex/event/semaphore at the first
place in WinMain call and, if already exists, signal another sync object back to the first instance of the app to close it. All it
takes is to replace the WaitForSingleObject call above by the WaitForMultipleObject.

--
=========
Regards,
KM


Message has been deleted
0 new messages