Scripting.FileSystemObject"

S

Stavros

Hi all

when I execute the following VB6 code in Windows 2000 and
as an Administrator, everything is working fine.

Project->References->"Microsoft Scripting Runtime" and
scrrun.dll is located in C:\WINNT\System32

Sub Main()
Dim fs As FileSystemObject

Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("c:\testfile.txt", True)
a.WriteLine ("This is a test.")
a.Close
End Sub

The problem is that when i try to execute it as a
Restricted User i get the message :

"Run-time error '-21470024770 (8007007e)'
Automation error
The specified module could not be found"

Can anyone has a solution to that?
 
C

Crirus

Hi

You should post on VB 6 newsgroup...

Anyway, if the component is installed only for the Administrator, it cant be
found by another user...
I guess you should register the component for that user if the user have the
permission to register components

Crirus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top