Resolved How to cause run only one instance of IExplore ?

vmars316

Active member
Joined
Aug 24, 2020
Messages
39
Programming Experience
Beginner
Im still working on KidSafeBrowser . and thanks mostly to you folks I have accomplished ;
WebBrowser1.IsWebBrowserContextMenuEnabled = False

WebBrowser1.Document.GetElementsByTagName("A")

Using key = My.Computer.Registry.CurrentUser.OpenSubKey(keyPath, True)
key.SetValue(valueName, CInt(ShortcutBehavior.CurrentWindowNewTab), RegistryValueKind.DWord)

And to make it truly kidsafe I need to make it to "allow only One Instance" of IExplore running at once .
So it can't start up another IExplore .

I suspect it will involve more messing with the Registry .
So I need Help .

Thanks for your Help...
 
I'm not sure what you're asking. But if you want your app to only run once. Follow the steps 1-3
Screenshot_18.jpg
 
I'm not sure what you're asking. But if you want your app to only run once. Follow the steps 1-3

Thanks ,

I thought I was all set (able to block new IE instances) ,
until I ran into this site kidzSearch.com .
In the first row of images , if I click on one of these , it opens up a new IE instance .
When I look thru this page's source view , there is no link for those images . So I don't know how/where it is getting these URLs from . So I don't know how to block/change these things .

So Here is my thinking :
If I can block IE from opening a new instance , problem solved .
Also , I don't know if the IE that is running with my code , is that counted as an instance ?
If it is then the above might work fine .

If above is not considered an instance (is there a registry entry that would tell me that) ,
then I would need to be looking at maybe blocking it from running ,
or constantly be checking checking if an instance just started up , and if so , kill that process

Can I kill a process using vb.net .

Another thought is that if it is not considered an instance ,
then what if I named my app IExplore.exe , would it then be considered an instance of IE ?
"Curiouser and curiouser" Eh?

Also , can your solution work for net 3.x ?
I think that is what I am using , vb.net 2019 .

Thanks for your Help...
 
Thanks ,
but I can't understand ms.Docs .
I did find this Gem though .
VB.NET:
        Dim processArray As Process() = Process.GetProcessesByName("iexplore")
        For Each p As Process In processArray
            p.Kill()
        Next

Upon further research it looks like p.Close() is the best way to go .
Thanks
 
Back
Top