Sign in to follow this  
Followers 0
fje081

Creating fileversion from ini file ?

3 posts in this topic

Hi,

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:

[image]

version=1.0

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

"test1.au3"

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

"version.au3"

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

This gives med the version of the AutoIT, 3.3.8.1. 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:

#AutoIt3Wrapper_Res_Fileversion=1.2.3.4

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  
Followers 0