
Set filesys = CreateObject("Scripting.FileSystemObject")
Thanks for help, I renamed .htm file into .hta file, and it works. But I
want to put it on the web, and .hta file is not opened with iexplorer. So is
it possible for my Script to be opened with iexplorer. I know that visitors
must get message "unsafe ActiveX...", the problem is that when I try to page
with Script I get "unsafe ActiveX..." and anybody else get Error message
"ActiveX component can't create object".
Luka
Quote:
> Q195826 - PRB: CreateObject Fails from Client-Side Scripts
> http://support.microsoft.com/support/kb/articles/Q195/8/26.ASP
> You can use any COM object inside IE hosted script provided you want to
deal with the hassles of the
Quote:
> IE enforced security model regarding "unsafe ActiveX...".
> Or you can simply use HTAs instead - as simple as saving the file with
.hta instead of .htm as the
Quote:
> extension. .hta files are hosted by mshta.exe rather than iexplore.exe,
and have a security model
Quote:
> comparable to a conventional Windows desktop application.
> Just remember that wscript/cscript.exe is still NOT the host. So the
intrinsic WScript object isn't
Quote:
> available, but the entire DHTML DOM is (pretty fair trade if you ask me
;-)..
> Description of Internet Explorer Security Zones Registry Entries
> http://support.microsoft.com/support/kb/articles/q182/5/69.asp
> --
> Michael Harris
> Microsoft.MVP.Scripting
> --
> Please do not email questions - post them to the newsgroup instead.
> --
Quote:
> > I made VBScript in HTML but it works just on my Computer, on my friends
> > computer or on any other it doesn't work. (they have Internet Explorer 5
> > like me) The Script is:
> > <script language="vbscript">
> > Set filesys = CreateObject("Scripting.FileSystemObject")
> > If Not filesys.FileExists("c:\op.1st") Then
> > 'none
> > Else
> > Location.href = "http://www.microsoft.com"
> > End If
> > </script>
> > --
> > | | | | / /\
> > | | | |/ \ /__\
> > | \___/ | \ / \
> > |____ Z E M U N