msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CreateObject("Scripting.FileSystemObject") Fails on some sta

 
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE
Author Message
Dave



Joined: 04 Oct 2007
Posts: 4

PostPosted: Fri Apr 01, 2005 7:49 pm    Post subject: CreateObject("Scripting.FileSystemObject") Fails on some sta Reply with quote

Hi

I wrote a little VB prog in which I create a "Scripting.FileSystemObject" object
this works perfectly on 99% of our workstations but on some
the CreateObject command fails????

Any idea what could cause this problem?
Could it be an outdate dll or ocx file?
How can I troubleshoot this problem?


Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject")
...
...


thx in advance
Dave

Archived from group: microsoft>public>vb>controls
Back to top
View user's profile Send private message
Al Reid



Joined: 04 Oct 2007
Posts: 230

PostPosted: Fri Apr 01, 2005 12:55 pm    Post subject: Re: CreateObject("Scripting.FileSystemObject") Fails on some Reply with quote

"Dave" wrote in message @4ax.com...
> Hi
>
> I wrote a little VB prog in which I create a "Scripting.FileSystemObject" object
> this works perfectly on 99% of our workstations but on some
> the CreateObject command fails????
>
> Any idea what could cause this problem?
> Could it be an outdate dll or ocx file?
> How can I troubleshoot this problem?
>
>
> Dim fs As Object
> Set fs = CreateObject("Scripting.FileSystemObject")
> ..
> ..
>
>
> thx in advance
> Dave
>

Dave,

The best way would be to loose the Scripting.FileSystemObject and use native VB file handling.

--

Al Reid
Back to top
View user's profile Send private message
Bob Butler



Joined: 04 Oct 2007
Posts: 2047

PostPosted: Fri Apr 01, 2005 10:47 am    Post subject: Re: CreateObject("Scripting.FileSystemObject") Fails on some Reply with quote

"Dave" wrote in message@4ax.com
> Hi
>
> I wrote a little VB prog in which I create a
> "Scripting.FileSystemObject" object this works perfectly on 99% of
> our workstations but on some the CreateObject command fails????
>
> Any idea what could cause this problem?
> Could it be an outdate dll or ocx file?
> How can I troubleshoot this problem?

It requires that scrrun.dll be installed on the system; in some
environments that file is specifically not allowed to prevent malicious
scripts to run. In your case it's probably just missing. As Al Reid
mentioned, your best bet is just to drop the FSO completely; compared to the
native VB commands (and an API call or two) it is slow, adds overhead and
makes your app susceptible to problems like this. There is nothing you need
it for.

--
Reply to the group so all can participate
VB.Net: "Fool me once..."
Back to top
View user's profile Send private message
Dave



Joined: 04 Oct 2007
Posts: 4

PostPosted: Fri Apr 01, 2005 9:11 pm    Post subject: Re: CreateObject("Scripting.FileSystemObject") Fails on some Reply with quote

Thx a lot Bob
scrrun.dll was indeed missing on the problemstations.
copying & registering the DLL fixed it

I will rewrite my source in native VB when I have some more time.

thx again


On Fri, 1 Apr 2005 05:47:30 -0800, "Bob Butler" wrote:

>"Dave" wrote in message
>@4ax.com
>> Hi
>>
>> I wrote a little VB prog in which I create a
>> "Scripting.FileSystemObject" object this works perfectly on 99% of
>> our workstations but on some the CreateObject command fails????
>>
>> Any idea what could cause this problem?
>> Could it be an outdate dll or ocx file?
>> How can I troubleshoot this problem?
>
>It requires that scrrun.dll be installed on the system; in some
>environments that file is specifically not allowed to prevent malicious
>scripts to run. In your case it's probably just missing. As Al Reid
>mentioned, your best bet is just to drop the FSO completely; compared to the
>native VB commands (and an API call or two) it is slow, adds overhead and
>makes your app susceptible to problems like this. There is nothing you need
>it for.

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Why can't create Excel.Application object using CreateObject Hi, there, I try to create an object using CreateObject function, I got "nothing" from the return variable without any error messages, but It works well on another computer, we have the same environment same references

Why no love for Scripting.FileSystemObject? In a very recent thread regarding the determination of folder existence, is was suggested that "scripting is not the best way to go" and stated that FSO is "execrable". Is there a technical reason for this anti-FSO sentiment, or is it a purist's stance?

FileSystemObject For standalone VB6 program, do I use the to access the files? or FSO is only for ASP? -- > There is no answer. > There has not been an answer. > There will not be an answer. > That IS the answer! > And I am screwed. > Deadline was due ye

FileSystemObject folder length Hello, I am wondering if there is a limit on how long a folder path can be for the I am trying to copy a file into a folder structure. and getting an error. my path is longer than 256 chars. and this seems to be the problem. the path i

Error when using FileSystemObject.Move I am using the FSO in my program and everything is working fine until I try to use the Move command as follows: fs.MoveFile strFileOld, strFileNew Then I get the "Permission Denied" error. Then when I check file attributes, there are no restrictions. Plea
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group