Program's Own File Version

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • majik92
    Forum Member
    • Feb 2007
    • 11

    Program's Own File Version

    How do you find the program's (exe) own file version?

    I tried this, but it didn't work.

    Code:
    version = File.GetVersionInfo(SourceFolder .. "\\cbsoft.exe");
    Label.SetText("Version Label", version);
    I got an error saying that on Line 2, the second argument must be of "type string". What does that mean? Are there any other way? Thanks.
  • Dermot
    Indigo Rose Customer
    • Apr 2004
    • 1791

    #2
    File.GetVersionInfo() returns a table so you need to use it like this.

    Code:
    Label.SetText("Version Label", version.FileVersion);
    Look it up in the help file to see all the table vaules.
    Dermot

    I am so out of here :yes

    Comment

    • Darryl
      Indigo Rose Staff Member
      • Jul 2001
      • 1908

      #3
      You should also change "SourceFolder" to "_SourceFolder" (without the quotes) in your file path.

      Comment

      • majik92
        Forum Member
        • Feb 2007
        • 11

        #4
        Thanks Dermot, I didn't know it returned a table. I thought it returned a string. And also, Darryl, in my actual project, I got it right, but it's a typo here, when I retyped it. Thanks anyway.

        Comment

        Working...
        X