Prevent browser close

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
 
M

Michael Nemtsev

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
 
M

Mark Rae

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

Velvet

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!
 
V

Velvet

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

Keep the idea's coming pelase...
 
M

Michael Nemtsev

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

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

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top