Reply to Thread

Post a reply to the thread: Can I get the version number from a file?

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 06-23-2007, 12:30 PM
    linder

    Re: Can I get the version number from a file?

    Tim,

    It's on the drawing board now, thank you.

    Friedrich
  • 06-22-2007, 09:11 PM
    timbojones

    Re: Can I get the version number from a file?

    It would be a very cool feature if the SB version field could reference one of the files in the installation, and automatically get the installer version number from the version resource of that file.
  • 06-20-2007, 01:50 AM
    David Webber

    Re: Can I get the version number from a file?

    Quote Originally Posted by linder View Post
    Dave,

    You are right. This is not happening at compile time but at installer run time!

    What you can do is to execute your own external service .exe from the script. Your exe can read the version info from xxx.exe and write it into, say an INI file. Then use the method demonstrated in the "Read Constant from INI.sb6" example script to read the value. You can use this to set your installer version number.

    BTW, of course, you can use SetupBuilder to write that .exe service file (two lines of script code).

    If you need a demo, just let me know and we'll develop one for you.

    Friedrich
    Got distracted and forgot to say thanks for this - I'll explore it.

    Dave
  • 06-12-2007, 04:42 AM
    linder

    Re: Can I get the version number from a file?

    Dave,

    You are right. This is not happening at compile time but at installer run time!

    What you can do is to execute your own external service .exe from the script. Your exe can read the version info from xxx.exe and write it into, say an INI file. Then use the method demonstrated in the "Read Constant from INI.sb6" example script to read the value. You can use this to set your installer version number.

    BTW, of course, you can use SetupBuilder to write that .exe service file (two lines of script code).

    If you need a demo, just let me know and we'll develop one for you.

    Friedrich
  • 06-12-2007, 04:32 AM
    Unregistered

    Re: Can I get the version number from a file?

    Quote Originally Posted by linder View Post
    David,

    There is a difference between "project compile-time" and "installer run-time" actions.

    When you say you can "get the file version number from xxx.exe", is this at compile-time (e.g. you run your own external program from the script to get the version number)?

    Friedrich
    I am using the "GetFileInformation" function from the file in my [SB_PROJECT] tree. I suspect this is not happening at compile time, though the information is there in principle at compile time. (It gets stored in a normal variable and not a compiler variable.)

    Dave
  • 06-12-2007, 04:19 AM
    linder

    Re: Can I get the version number from a file?

    David,

    There is a difference between "project compile-time" and "installer run-time" actions.

    When you say you can "get the file version number from xxx.exe", is this at compile-time (e.g. you run your own external program from the script to get the version number)?

    Friedrich
  • 06-12-2007, 03:50 AM
    Unregistered

    Can I get the version number from a file?

    I am writing an installer to install anumber of files including, say, xxx.exe

    I can get the file version number from xxx.exe, but can i set the version number of the installer to match?

    David Webber

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •