By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,288 Members | 1,139 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,288 IT Pros & Developers. It's quick & easy.

Prevent browser close

P: n/a
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

May 18 '07 #1
Share this Question
Share on Google+
6 Replies

P: n/a
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

VI am developing for a kiosk system. IE is loaded on this sytem and
Vwe want to make sure that there is a browser open to our website
Vlocation at all times. So when the user closes the browser we want
Vto either stop the close and send the user back to the default page,
Vor we want to detect to make sure there isn't anyother browser open
Vand if not open a new one to replace the one that was closed.
V>
VSo does anyone have any code samples that would help out on one or
Vmore parts of this?
V>
VThanks in advance!
VVelvet
May 18 '07 #2

P: n/a
"Velvet" <MS***********@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
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...
--
http://www.markrae.net

May 18 '07 #3

P: n/a
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!
"Michael Nemtsev" <ne*****@msn.comwrote in message
news:a2***************************@msnews.microsof t.com...
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

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


May 18 '07 #4

P: n/a
We are locking down all other operations through group policy's.

Keep the idea's coming pelase...
"Mark Rae" <ma**@markNOSPAMrae.netwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
"Velvet" <MS***********@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>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...
--
http://www.markrae.net

May 18 '07 #5

P: n/a
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

VThe network cable will not be accessible so I don't see that as an
Vissue.
V>
VAbout the service. I've not written a service application before.
VDo you know of any tutorials which would point me in the right
Vdirection?
V>
VAlso, isn't there something that I could do in the window.onclose
Vevent that could prevent the browser from closing in the first place?
VI haven't found anything in my searches, but I seem to remember that
Vit was possible.
V>
VThanks!
V>
V"Michael Nemtsev" <ne*****@msn.comwrote in message
Vnews:a2***************************@msnews.microso ft.com...
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

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

May 18 '07 #6

P: n/a
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
"Velvet" <MS***********@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>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

May 18 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.