简体   繁体   中英

FileSystemObject

My script fly with IE8 when I instantiate the file system object:

var fso  = new ActiveXObject("Scripting.FileSystemObject");
alert("does not reach this point");

Any ideas?

Microsoft blocked ActiveXObject("Scripting.FileSystemObject") with a kill bit or removed the registry keys required to launch it for newer versions of IE, including IE 8. This was done for security reasons. So unless you modify the registry, it should not launch.

More on this issue, and solutions are available from MSDN at: http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/27092b49-7d3e-4d86-9ffb-223a26037c3f

Modifying the registry to mark FileSystemObject Active Control as Safe: http://msdn.microsoft.com/en-us/library/aa751977(VS.85).aspx

There is also a similar thread here: "var f = new ActiveXObject('Scripting.FileSystemObject');" not working with IE8

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM