Set vIExp = CreateObject("InternetExplorer.Application")
from my VBScript in a web page. That is, I have one IE active and accepting input, and want to create another one pointing to a URL that is determined by some form input values from the first IE.
It works fine, but I always get this "ActiveX control on this page might be unsafe to interact etc etc etc Do you want to continue". How can I prevent this box and just bring up the new page? I've played around with some of the security settings in the IE properties page, but I can't make it go away. Can anybody help here?
Presumably this is local? You can't change settings for visitors to a website. And if it's local then can't you use an HTA?
If it's local and you want to make IE safe, you can set these values in the Registry:
Every object has a ProgID in HKCR. In this case it's InternetExplorer.Application. Under that key look for the CLSID key. The value in there points to a key under HKCR\CLSID.
So you find HKCR\InternetExplorer.Application\CLSID\[xxx] Then open HKCR\CLSID\[xxx] Under that key, create a subkey, if it doesn't a;ready exist, named Implemented Categories. Under that key create two more subkeys with the following names:
So it's like: HKCR\CLSID\[xxx]\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}
where [xxx] is the CLSID of the object.
Those settings mark an object as safe for scripting and safe for initialization. The settings correspond to the IE security settings related to "unsafe ActiveX".
There are obvious risks to setting an object safe if it was not considered to be safe by it's author. Hopefully you're not going to use IE as your online browser.
-- --
EdB <E...@discussions.microsoft.com> wrote in message
> Set vIExp = CreateObject("InternetExplorer.Application")
> from my VBScript in a web page. That is, I have one IE active and accepting > input, and want to create another one pointing to a URL that is determined by > some form input values from the first IE.
> It works fine, but I always get this "ActiveX control on this page might be > unsafe to interact etc etc etc Do you want to continue". How can I prevent > this box and just bring up the new page? I've played around with some of the > security settings in the IE properties page, but I can't make it go away. > Can anybody help here?
> Set vIExp = CreateObject("InternetExplorer.Application")
> from my VBScript in a web page. That is, I have one IE active and accepting > input, and want to create another one pointing to a URL that is determined by > some form input values from the first IE.
> It works fine, but I always get this "ActiveX control on this page might be > unsafe to interact etc etc etc Do you want to continue". How can I prevent > this box and just bring up the new page? I've played around with some of the > security settings in the IE properties page, but I can't make it go away. > Can anybody help here?
> Thanks, > Ed
Why are you doing it that way? That is nothing but problems, as you've found. The user must change there security settings too low for this to be useful, is a terrible idea and is outside of your control. Why are you not using window.open? _____________________ Tom Lavedas
"Tom Lavedas" wrote: > On Nov 19, 9:10 am, EdB <E...@discussions.microsoft.com> wrote: > > I need to do
> > Set vIExp = CreateObject("InternetExplorer.Application")
> > <snip> > > Thanks, > > Ed
> Why are you doing it that way? That is nothing but problems, as > you've found. The user must change there security settings too low > for this to be useful, is a terrible idea and is outside of your > control. Why are you not using window.open? > _____________________ > Tom Lavedas > .
I am doing it that way because I would like to reuse the newly-opened window to navigate to other URLs. I do not know of a way to do this with window.open. I want to avoid having lots of IE windows all over the desktop, if possible.
Having an instance of IE available allows me to call navigate(url). This is part of an activity that could go on for many hours, and the users get cranky when they have to keep closing/collapsing/moving/etc windows around.
If there is a way to use window.open() and then make it re-navigate based on user input then I would certainly be open to it. This is stuff I do not know much about.
> "Tom Lavedas" wrote: > > On Nov 19, 9:10 am, EdB <E...@discussions.microsoft.com> wrote: > > > I need to do
> > > Set vIExp = CreateObject("InternetExplorer.Application")
> > > <snip> > > > Thanks, > > > Ed
> > Why are you doing it that way? That is nothing but problems, as > > you've found. The user must change there security settings too low > > for this to be useful, is a terrible idea and is outside of your > > control. Why are you not using window.open? > > _____________________ > > Tom Lavedas > > .
> I am doing it that way because I would like to reuse the newly-opened window > to navigate to other URLs. I do not know of a way to do this with > window.open. I want to avoid having lots of IE windows all over the > desktop, if possible.
> Having an instance of IE available allows me to call navigate(url). This is > part of an activity that could go on for many hours, and the users get cranky > when they have to keep closing/collapsing/moving/etc windows around.
> If there is a way to use window.open() and then make it re-navigate based on > user input then I would certainly be open to it. This is stuff I do not know > much about.
> Ed
> Ed
Here is a little example that does that ...
<html> <script language=vbs> dim g_oWdw
sub window_onload set g_oWdw = window.open("about:blank", "Test", "resizable=yes,location=no,menubar=no,toolbar=no") end sub
sub btn1_onclick g_oWdw.location = "http://msdn.microsoft.com/en-us/library/ ms536651%28VS.85%29.aspx" end sub </script> <body> Testing <br> <input type=button name=btn1 value=GO> </body> </html>
I didn't bother to size and position the windows. _____________________ Tom Lavedas