Enable Initialize and script ActiveX controls not marked as safe By javascript code

I use the command :

var oExcel = new ActiveXObject("Excel.Application");

to create an excel file using a javascript code..

I realize that this would only work if the client's IE browser has the "Initialize and script ActiveX controls not marked as safe" option selected. This option is disabled by default

Is there a way to achieve the same goal using javascript so that I dont have to go to each client to tell them they must change their browser's security settings?
Who is Participating?
geowrianConnect With a Mentor Commented:
My opinion is that you are kind of stuck without a way to automate it. This leaves you with 2 main options:

1) Post instructions on the website with how to add the site as a trusted site and to change the trusted site settings to allow that permission. I was using IE6, whcih already has that permission set ion the trusted sites zone - maybe IE7/8 still have it disabled by default.

2) Create an application or script (see AutoIt) to add your site as a trusted site and change the permission.
Honestly, the best thing would probably be to tell them to add your site to the trusted sites security zone. Changing that setting on the Internet (or Intranet) zone leaves them potentially vulnerable while on other websites.
Hello louisgh,

If you're a domain you can achieve geowrian's proposition with a GPO : http://support.microsoft.com/kb/274846

louisghAuthor Commented:
I'm not a domain .. but I tried to add my site to the trusted sites and it didn't work!!
louisghAuthor Commented:
I will try .. thnx
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.