Jump to content
Sign in to follow this  

Creating fileversion from ini file ?

Recommended Posts



I`m new to script language. I`m trying to create a version of a file.

I have a version.ini file with these information:



Then I`m trying to create a test1.exe file by reading this version.ini file by writing these lines in AutoIt:


Local $ver = IniRead("version.ini", "Image", "version", "NotFound")

Then I want to read the version of this newly created test1.exe file by creating a new file called version.exe


Local $ver = FileGetVersion("test1.exe")

This gives med the version of the AutoIT, This is not what i wanted as output. The output should be 1.0.

What am I doing wrong ?

Hope someone can help me on this ?

Share this post

Link to post
Share on other sites

Hello fje081,

you need to add a line at the top of your script like this:


But there is, as far as I know, no way to set the own Version on execution and not on compilation.

Maybe there's also a command line switch for the aut2exe.exe but I haven't looked into this yet.

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post

Link to post
Share on other sites

If you use the compile options to store the info in the script, then you can read your script source from another program. Compare each line to "#AutoIt3Wrapper_Res_Fileversion=" and tack on the version number you got from the ini file.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this