Prevent browser close

  • Thread starter Thread starter Velvet
  • Start date Start date
V

Velvet

I am developing for a kiosk system. IE is loaded on this sytem and we want
to make sure that there is a browser open to our website location at all
times. So when the user closes the browser we want to either stop the close
and send the user back to the default page, or we want to detect to make
sure there isn't anyother browser open and if not open a new one to replace
the one that was closed.

So does anyone have any code samples that would help out on one or more
parts of this?

Thanks in advance!
Velvet
 
Hello Velvet,

Write the service which enumerate all windows and check that browser with
your site in title is exist and active

But what u gonna do if user plug off network cable?

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

V> I am developing for a kiosk system. IE is loaded on this sytem and
V> we want to make sure that there is a browser open to our website
V> location at all times. So when the user closes the browser we want
V> to either stop the close and send the user back to the default page,
V> or we want to detect to make sure there isn't anyother browser open
V> and if not open a new one to replace the one that was closed.
V>
V> So does anyone have any code samples that would help out on one or
V> more parts of this?
V>
V> Thanks in advance!
V> Velve
 
So does anyone have any code samples that would help out on one or more
parts of this?

See Michael's response...

How could you prevent someone from popping Task Manager and killing the
task...?

There really is no 100% reliable way of doing this...
 
The network cable will not be accessible so I don't see that as an issue.

About the service. I've not written a service application before. Do you
know of any tutorials which would point me in the right direction?

Also, isn't there something that I could do in the window.onclose event that
could prevent the browser from closing in the first place? I haven't found
anything in my searches, but I seem to remember that it was possible.

Thanks!
 
We are locking down all other operations through group policy's.

Keep the idea's coming pelase...
 
Hello Velvet,

Start from here http://pinvoke.net/default.aspx/user32/EnumWindows.html

I'd recommed to unload shell at all (explorer), and apply strick group policies,
so users have no access to any windows applications except your browser.
This is topic for windows newsgroups

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

V> The network cable will not be accessible so I don't see that as an
V> issue.
V>
V> About the service. I've not written a service application before.
V> Do you know of any tutorials which would point me in the right
V> direction?
V>
V> Also, isn't there something that I could do in the window.onclose
V> event that could prevent the browser from closing in the first place?
V> I haven't found anything in my searches, but I seem to remember that
V> it was possible.
V>
V> Thanks!
V>
V> V>
Hello Velvet,

Write the service which enumerate all windows and check that browser
with your site in title is exist and active

But what u gonna do if user plug off network cable?

---
WBR, Michael Nemtsev [.NET/C# MVP]. My blog:
http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo

V> I am developing for a kiosk system. IE is loaded on this sytem
and
V> we want to make sure that there is a browser open to our website
V> location at all times. So when the user closes the browser we
want
V> to either stop the close and send the user back to the default
page,
V> or we want to detect to make sure there isn't anyother browser
open
V> and if not open a new one to replace the one that was closed.
V> V> So does anyone have any code samples that would help out on one
or
V> more parts of this?
V> V> Thanks in advance!
V> Velvet
 
Problem Solved! It turns out that we can disable browesr close with in the
group policies in Windows itself! YAY! No extra last minute coding
required!

Thanks all!
Velvet
 
Back
Top