Re: FileSystemObject problem

Tech-Archive recommends: Fix windows errors by optimizing your registry



"vul" <aaa@xxxxxxxxxxxxx> wrote in message
news:udzm3hFqGHA.4188@xxxxxxxxxxxxxxxxxxxxxxx
I have a very strange problem with FSO.
I need to compare versions of 2 files located in different places. 1 of
them is in App.Path, and another one let's say in "C:\MyDLLs". Both have
the same name WorkorderXML.dll
I'm doing this:
Dim obj As New FileSystemObject
Dim strSource As String
strSource = "C:\MyDLLs\WorkorderXML.dll"
MsgBox obj.GetFileVersion(strSource)

If I run the project from VB, it returns correct version, if I run
compiled EXE, which is located in App.Path of VB project, it returns the
version of the file, located in App.Path directory, not in "C:\MyDLLs". If
I delete WorkorderXML.dll from App.Path, then even EXE returns the version
of the file from "C:\MyDLLs". If I return WorkorderXML.dll into App.Path,
EXE starts to return its version.
It drives me crazy, I spent several hours on this problem.
Any hint please.

Al

Try this instead:

http://vbnet.mvps.org/code/fileapi/filesearchinfo.htm




.



Relevant Pages

  • Re: FileSystemObject problem
    ... step to squeeze the code from that sample for my need. ... I need to compare versions of 2 files located in different places. ... Dim obj As New FileSystemObject ... If I delete WorkorderXML.dll from App.Path, then even EXE returns the ...
    (microsoft.public.vb.general.discussion)
  • Re: FileSystemObject problem
    ... analyses to make it work first. ... I need to compare versions of 2 files located in different places. ... Dim obj As New FileSystemObject ... If I delete WorkorderXML.dll from App.Path, then even EXE returns the ...
    (microsoft.public.vb.general.discussion)
  • FileSystemObject problem
    ... I have a very strange problem with FSO. ... I need to compare versions of 2 files located in different places. ... Dim obj As New FileSystemObject ... then even EXE returns the version of the ...
    (microsoft.public.vb.general.discussion)
  • Re: Exe Size
    ... of how big anyone's exe has gotten that actually has an application that is ... It's a tough thing to compare... ... sizes depending on how resources are handled. ... stuff such as database access programs (one of the ones I'm working on ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Still Loving Python
    ... links and runs the resulting independent windows .exe in a fraction of a second ... >>> for the above, and I can see the hint, kill the .exe, and go on where I was. ... Not in a fraction of a second, but that's sort of irrelevant to ...
    (comp.lang.python)