FileSystemObject..GetFileVersion()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jamin Guy

    #1

    FileSystemObject..GetFileVersion()

    Has anyone successfully used the FileSystemObjec t.GetFileVersio n
    function to get the version of a file on a remote machine? and if so
    how? I'm not able to get it to work. It works from a VBScript
    application, but not from C#...

  • Mattias Sjögren

    #2
    Re: FileSystemObjec t..GetFileVersi on()

    [color=blue]
    >Has anyone successfully used the FileSystemObjec t.GetFileVersio n
    >function to get the version of a file on a remote machine? and if so
    >how? I'm not able to get it to work. It works from a VBScript
    >application, but not from C#...[/color]

    Why would you use the FileSystemObjec t over .NET's FileVersionInfo
    class for this in C#?



    Mattias

    --
    Mattias Sjögren [MVP] mattias @ mvps.org
    http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
    Please reply only to the newsgroup.

    Comment

    • Mattias Sjögren

      #3
      Re: FileSystemObjec t..GetFileVersi on()

      [color=blue]
      >Has anyone successfully used the FileSystemObjec t.GetFileVersio n
      >function to get the version of a file on a remote machine? and if so
      >how? I'm not able to get it to work. It works from a VBScript
      >application, but not from C#...[/color]

      Why would you use the FileSystemObjec t over .NET's FileVersionInfo
      class for this in C#?



      Mattias

      --
      Mattias Sjögren [MVP] mattias @ mvps.org
      http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
      Please reply only to the newsgroup.

      Comment

      • Jamin Guy

        #4
        Re: FileSystemObjec t..GetFileVersi on()

        Will FileVersionInfo work for files on a remote machine?

        Comment

        • Jamin Guy

          #5
          Re: FileSystemObjec t..GetFileVersi on()

          Will FileVersionInfo work for files on a remote machine?

          Comment

          • Mattias Sjögren

            #6
            Re: FileSystemObjec t..GetFileVersi on()

            [color=blue]
            >Will FileVersionInfo work for files on a remote machine?[/color]

            Don't think I've ever tried it, but I don't see why it wouldn't.



            Mattias

            --
            Mattias Sjögren [MVP] mattias @ mvps.org
            http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
            Please reply only to the newsgroup.

            Comment

            • Jamin Guy

              #7
              Re: FileSystemObjec t..GetFileVersi on()

              I just got it to work, but I had to use the WindowsIdentity class with
              the LogonUser api function to impersonate a user with access to the
              machine.

              Comment

              • Mattias Sjögren

                #8
                Re: FileSystemObjec t..GetFileVersi on()

                [color=blue]
                >Will FileVersionInfo work for files on a remote machine?[/color]

                Don't think I've ever tried it, but I don't see why it wouldn't.



                Mattias

                --
                Mattias Sjögren [MVP] mattias @ mvps.org
                http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
                Please reply only to the newsgroup.

                Comment

                • Jamin Guy

                  #9
                  Re: FileSystemObjec t..GetFileVersi on()

                  I just got it to work, but I had to use the WindowsIdentity class with
                  the LogonUser api function to impersonate a user with access to the
                  machine.

                  Comment

                  Working...