Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Scripting.FileSystemObject ActiveX control in Internet zone

 
Mohamed Soliman
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all

I'm wondering if there is a way to run an ActiveX control without changing any security settings for the zone? I'm running on internet zone this code

fso = new ActiveXObject("Scripting.FileSystemObject");

but it throws an exception. It only runs when I set the oprion "Initialize and script ActiveX controls not marked as safe for scripting" to enabled or prompt.

I want to run the control without modyfing any security settings. Is that possible? and if not..is there any other way to access System directories and folders using javascript or any other API?

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64845
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you could simply bypass the security settings, of what use would they be?
 
Mohamed Soliman
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:If you could simply bypass the security settings, of what use would they be?


I use it for directory listing so that I can get the path of any folder on the system, and take that path and update a regular text input with its value. After some investigations, I learnt that in order for the component to run while IE security settings are disabled, the ActiveX component class in windows registery should have the following two keys (keys of categories):

1. SafeForScripting
2. SafeForInitializing

I tried adding the two keys of the required implemented categories to the Scripting.FileSystemObject ActiveX in windows registry, and now I dont get an exception like before, but nothing appears in my page!



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic