aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Using Scripting.FileSystemObject ActiveX control in Internet zone Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Using Scripting.FileSystemObject ActiveX control in Internet zone " Watch "Using Scripting.FileSystemObject ActiveX control in Internet zone " New topic
Author

Using Scripting.FileSystemObject ActiveX control in Internet zone

Mohamed Soliman
Greenhorn

Joined: Mar 09, 2010
Posts: 13
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

Joined: Jan 10, 2002
Posts: 61648
    
  67

If you could simply bypass the security settings, of what use would they be?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mohamed Soliman
Greenhorn

Joined: Mar 09, 2010
Posts: 13
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!



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Scripting.FileSystemObject ActiveX control in Internet zone