By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,834 Members | 1,176 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,834 IT Pros & Developers. It's quick & easy.

Code verison in executable file

P: 2
Hi,

is there a straight forward way to have version information embedded in an executable? What I would like is to release a file and when the user does something like "program -v" they will be presented with the version information. The only way I can see just now to do it would be to parse the command line arguments looking for the -v option.

Is there any other ways of doing it - maybe by embedding something into the executable so that another command can help, such as 'file'?

Regards,

John.
Apr 3 '08 #1
Share this Question
Share on Google+
2 Replies

micmast
100+
P: 144
looks doubtfull to me, I could be wrong, but I don't think file or any other file could do that.
Apr 3 '08 #2

Expert 100+
P: 392
is there a straight forward way to have version information embedded in an executable?
Sure, but the way it would be done would depend on the language the executable was compiled from.



What I would like is to release a file and when the user does something like "program -v" they will be presented with the version information. The only way I can see just now to do it would be to parse the command line arguments looking for the -v option.
Yep that is the way it works. Generally any executable should be parsing and validating any arguments passed to it.
Apr 7 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.