Solved

FileSystemObject, with VB 6 and Windows XP

Posted on 2002-03-20
5
210 Views
Last Modified: 2010-05-02
I've been trying to use the Scripting.FileSystemObject in VB 6 on my Windows XP Pro machine.

The object doesn't seem to exists, from what the error messages are returning:

"User-defined type not defined"

Has the scripting code changed between win2000 and XP?

Has anyone been able access folders and file information with VB 6 on XP?

Note: Unsure, but, do I have to install windows scripting on XP?
0
Comment
Question by:Timelib
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 50 total points
ID: 6884713
Hi Timelib,

Seems like the scrrun.dll isn't recognized, you could try late binding if you use early binding. You recompiled the code on the XP machine?

Also a note on fso in VB, it was intended for scripting languages like VBScript. VB has his own file I/O capabilities you'd need. When all else fails there are always a few API functions to use.

:O)Bruintje
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6885014
You're right that Windows Scripting is needed to run FSO. Not sure though w.r.t. XP. Otherwise, as suggested already by bruintje, you can use other methods, so that you dont need to reference to one more DLL in your project.

Still if you wish to use FSO, just check scrrun.dll is there in your system and also registered: i.e.
Start/Run - RegSvr32.exe scrrun.dll

Hope it helps.
0
 
LVL 1

Author Comment

by:Timelib
ID: 6886849
scrrun.dll is in XP Pro, and registered but its not except it as defined.

What API functions can be called, and were can I get examples or more information on them?
0
 
LVL 1

Author Comment

by:Timelib
ID: 6886896
I've wrote with the FSO before, I just forgot one minor step......binding (referencing) the scrrun.dll first.....

And I call my self a programmer....

Thanks for the help.
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6887817
We had faced problems with FSO, say, if a system does not have Windows Scripting Host(hope, this could happen, if Internet Explorer installed in Win95 is default one, and not like IE4 or IE5). Then your program wont run, causing error.

So, recommend not using FSO, otherwise include it(scrrun.dll) in your project installation and register in installation PC.

Hope it helps.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question