Solved

FileSystemObject, with VB 6 and Windows XP

Posted on 2002-03-20
5
207 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

919 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now