PRB: FileSystemObject Object Causes Scripting ErrorID: Q190245
|
When the FileSystemObject object is instantiated by Internet Explorer 3.x with Scripting 2.0, the error message "Object not safe for scripting" appears. This warning occurs regardless of the current security setting.
The FileSystemObject object is not considered safe for scripting because it
allows access to the hard disk.
With objects not considered safe for scripting, a safety error can be
suppressed by the user setting the appropriate Internet Explorer security
setting. By modifying the settings in the Internet Options dialog box, the
browser can be set to prompt the user or disregard the error.
For the FileSystemObject object, Internet Explorer 3.x does not respect
this security setting and will always display the error message.
This problem has been fixed in Internet Explorer 4.0.
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This bug has been corrected in Internet
Explorer 4.0.
<SCRIPT Language="VBScript">
<!--
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("c:\testfile.txt", True)
a.WriteLine("This is a test.")
a.Close
-->
</SCRIPT>
For more information, please see the MSDN Web Workshop:
http://msdn.microsoft.com/workshop/default.asp
Additional query words:
Keywords : kbJScript kbVBScript
Version : WINDOWS:2.0,3.0,3.01,3.02
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 3, 1999