Click to See Complete Forum and Search --> : Automation server can't create object


dan
03-22-2000, 11:02 AM
Hello,
I am getting a 'cant create object error when trying to run the code below.
It errs on the line 'Filesystem = new ActiveXObject("Scripting.FileSystemObject")'.
Does anyone know what may be going wrong?
Thanks
Dan

<%@ LANGUAGE=JavaScript %>
<%
var Filesystem, drv, drvs, enumdrvs
Filesystem = new ActiveXObject("Scripting.FileSytemObject")
drvs = Filesystem.drives
enumdrvs = new enumerator(drvs)
enumdrvs.movefirst()
while (! enumdrvs.atend() ) { %>
drive: <%=enumdrvs.item().driveletter%><p>
<% if (enumdrvs.item().isready == true) { %>
volume: <%=enumdrvs.item().volumename%><p>
space free: <%=enumdrvs.item().freespace%> bytes<p>
<% } else { %>
drive isn't ready.<p>
<% }
enumdrvs.movenext()
}
%>

Hans van Doormalen
06-29-2000, 05:26 AM
I'm having the same problem, if you have a solution by now, please mail it
to me, it seems that the problem is occurs only when you try to run it on
a client, when you try it local it works perfectly.

"dan" <none@noemail.com> wrote:
>
>Hello,
> I am getting a 'cant create object error when trying to run the code below.
> It errs on the line 'Filesystem = new ActiveXObject("Scripting.FileSystemObject")'.
> Does anyone know what may be going wrong?
>Thanks
>Dan
>
><%@ LANGUAGE=JavaScript %>
><%
>var Filesystem, drv, drvs, enumdrvs
I'm having the same problem whith javascript

>Filesystem = new ActiveXObject("Scripting.FileSytemObject")
>drvs = Filesystem.drives
>enumdrvs = new enumerator(drvs)
>enumdrvs.movefirst()
>while (! enumdrvs.atend() ) { %>
>drive: <%=enumdrvs.item().driveletter%><p>
><% if (enumdrvs.item().isready == true) { %>
>volume: <%=enumdrvs.item().volumename%><p>
>space free: <%=enumdrvs.item().freespace%> bytes<p>
><% } else { %>
>drive isn't ready.<p>
><% }
> enumdrvs.movenext()
> }
> %>

James
06-29-2000, 10:13 PM
I'm going to guess that it is because of Browser Security. Most web browsers
have thier security set so that the local file system can not be tampered
with when viewing a page that is not local to the machine. So most likely
your only ability to access the file system is going to be by using the Common
Dialog ActiveX component.

James
"Hans van Doormalen" <waterdrops2@hotmail.com> wrote:
>
>I'm having the same problem, if you have a solution by now, please mail
it
>to me, it seems that the problem is occurs only when you try to run it on
>a client, when you try it local it works perfectly.
>
>"dan" <none@noemail.com> wrote:
>>
>>Hello,
>> I am getting a 'cant create object error when trying to run the code
below.
>> It errs on the line 'Filesystem = new ActiveXObject("Scripting.FileSystemObject")'.
>> Does anyone know what may be going wrong?
>>Thanks
>>Dan
>>
>><%@ LANGUAGE=JavaScript %>
>><%
>>var Filesystem, drv, drvs, enumdrvs
>I'm having the same problem whith javascript
>
>>Filesystem = new ActiveXObject("Scripting.FileSytemObject")
>>drvs = Filesystem.drives
>>enumdrvs = new enumerator(drvs)
>>enumdrvs.movefirst()
>>while (! enumdrvs.atend() ) { %>
>>drive: <%=enumdrvs.item().driveletter%><p>
>><% if (enumdrvs.item().isready == true) { %>
>>volume: <%=enumdrvs.item().volumename%><p>
>>space free: <%=enumdrvs.item().freespace%> bytes<p>
>><% } else { %>
>>drive isn't ready.<p>
>><% }
>> enumdrvs.movenext()
>> }
>> %>
>

Gene Black
07-03-2000, 05:31 PM
Assuming that you copy/pasted the code into the original
message:("Scripting.FileSytemObject")
is misspelled.

it should be ("Scripting.FileSystemObject")



"dan" <none@noemail.com> wrote in message news:38d8e09d$1@news.devx.com...
>
> Hello,
> I am getting a 'cant create object error when trying to run the code
below.
> It errs on the line 'Filesystem = new
ActiveXObject("Scripting.FileSystemObject")'.
> Does anyone know what may be going wrong?
> Thanks
> Dan
>
> <%@ LANGUAGE=JavaScript %>
> <%
> var Filesystem, drv, drvs, enumdrvs
> Filesystem = new ActiveXObject("Scripting.FileSytemObject")
> drvs = Filesystem.drives
> enumdrvs = new enumerator(drvs)
> enumdrvs.movefirst()
> while (! enumdrvs.atend() ) { %>
> drive: <%=enumdrvs.item().driveletter%><p>
> <% if (enumdrvs.item().isready == true) { %>
> volume: <%=enumdrvs.item().volumename%><p>
> space free: <%=enumdrvs.item().freespace%> bytes<p>
> <% } else { %>
> drive isn't ready.<p>
> <% }
> enumdrvs.movenext()
> }
> %>

dnanetwork
04-16-2008, 01:16 AM
well i’ve been fighting for 2 days..for this ***in error..
and i found the cause….which is..
1> whenever you try to access system files from your machine…system security layer won’t allow it..
2> windows script 5.6 update..
solution..
1> open your web browser..go to internet options..choose
security tab..after that click on custom level
button..
after that..set options for download signed activex control…set to enable..
next download unsigned activex control..set to enable..
(setting this will clear all the problems..
because when user try to run that script..
at run time..user trying to load activex control..
which won’t be created & hence the error..)
and try to keep the custom settings..medium low or low..
and windows script 5.6 ..update..i’m not sure..about that
crap..
******** This will work on any OS..
doesn't matter if it's asp,jsp,asp.net,php...or any other new lang.
you ppl know..just try...

in case if my written **** won’t work..
you should try for window script 5.6 update..
sorry guys i’m lil..drunk right now..

dnanetwork
04-28-2008, 10:10 AM
:cool: well i’ve been fighting for 2 days..for this ***in error..
and i found the cause….which is..
1> whenever you try to access system files from your machine…system security layer won’t allow it..
2> windows script 5.6 update..
solution..
1> open your web browser..go to internet options..choose
security tab..after that click on custom level
button..
after that..set options for download signed activex control…set to enable..
next download unsigned activex control..set to enable..
(setting this will clear all the problems..
because when user try to run that script..
at run time..user trying to load activex control..
which won’t be created & hence the error..)
and try to keep the custom settings..medium low or low..
and windows script 5.6 ..update..i’m not sure..about that
****..
in case if my written **** won’t work..
you should try for window script 5.6 update..
sorry guys i’m lil..drunk right now..but i 'm right..