Set filesys = CreateObject("Scripting.FileSystemObject") 
Author Message
 Set filesys = CreateObject("Scripting.FileSystemObject")

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.*-*-*.com/ "
End If
</script>

--

|          |       |  |  /      /\
|          |       |  |/ \    /__\
|          \___/  |    \ /       \
|____  Z   E   M   U   N



Wed, 03 Sep 2003 18:09:11 GMT  
 Set filesys = CreateObject("Scripting.FileSystemObject")
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
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
extension. .hta files are hosted by mshta.exe rather than iexplore.exe, and have a security model
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
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



Thu, 04 Sep 2003 03:09:03 GMT  
 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.
> --




- Show quoted text -

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



Thu, 04 Sep 2003 18:44:29 GMT  
 Set filesys = CreateObject("Scripting.FileSystemObject")
The reason others get outright failures is because they have the "Initialize and script ActiveX
controls not marked as safe..." option set to disable rather than prompt.  I don't know who your
"visitors" are, but I for one would never accept "unsafe" content from *any* Internet site,
including Microsoft...  IMO using "unsafe" components in anything other than an Intranet setting is
inappropriate design, and even in the Intranet case, I still think it's highly questionable.

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> 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



> > 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
> > 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
> > extension. .hta files are hosted by mshta.exe rather than iexplore.exe,
> and have a security model
> > 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
> > 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.
> > --



> > > 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



Fri, 05 Sep 2003 07:34:14 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Help! MSDOS 5.3 - troll alert

2. Set filesys = CreateObject("Scripting.FileSystemObject")

3. Set fs = CreateObject("Scripting.FileSystemObject")-error

4. Set fso = Server.CreateObject("Scripting.FileSystemObject")

5. Getting characters from keyboard in graph mode

6. Structure of BP.TP files

7. CreateObject("Scripting.FileSystemObject") doesnt work

8. CreateObject("Scripting.FileSystemObject")

9. CreateObject("Scripting.FileSystemObject") Error

10. ** ? concerning CreateObject("Scripting.FileSystemObject")

11. CreateObject("Scripting.FileSystemObject") Error

12. ** ? concerning CreateObject("Scripting.FileSystemObject")

 

 
Powered by phpBB® Forum Software