Solved

FileSystemObject, with VB 6 and Windows XP

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

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…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
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…

772 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