By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,961 Members | 1,456 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,961 IT Pros & Developers. It's quick & easy.

Scripting.FileSystemObject"

P: n/a
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?

Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

--

------------------------------
If work were a good thing, the boss would take it all from you

------------------------------

"Stavros" <SP***********@art-cad.gr> wrote in message
news:0f****************************@phx.gbl...
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?

Nov 20 '05 #2

P: n/a
* "Stavros" <SP***********@art-cad.gr> scripsit:
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 :


This is a VB.NET group. Please turn to one of the VB Classic groups
(microsoft.public.vb.*).

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.