Reloading IE (kiosk mode)

G

Guest

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
 
K

KM

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.
 
M

Mike Warren

Richard said:
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"
 
G

Guest

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
 
M

Mike Warren

Richard said:
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
 
G

Guest

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


Mike Warren said:
Richard said:
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
 
K

KM

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.
 
J

jbcseri

Mike-
It's been a long time since I've done any code writing; I definitely
need to brush up. Would you consider posting the source code to your
watchdog app, or sending me a copy of it? I wouldn't mind having it so
that I can see exactly how it works and try some of the modifications
that KM has suggested in order to make it faster.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top