careca

FileGetVersion

8 posts in this topic

Hi, im trying to get the file version. "16.612.1119.0"

This is what i did, and what i got.

ConsoleWrite(FileGetVersion (@ScriptDir&"\SciTE4AutoIt3.exe", "FileVersion") &@CRLF)

Result:

${MyVersion}

What am i missing here?

version.PNG


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Share this post


Link to post
Share on other sites



careca,

Use $FV_FILEVERSION, not "FileVersion" - you will also need to include FileConstants.au3.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Exact same output

#include <FileConstants.au3>
ConsoleWrite(FileGetVersion (@ScriptDir&"\SciTE4AutoIt3.exe", $FV_FILEVERSION) &@CRLF)

:\


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Turns out it works without any parameter... o.O

Possibly something is wrong with this function, no?

Edited by careca

Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Share this post


Link to post
Share on other sites
ConsoleWrite(FileGetVersion (@ScriptDir&"\SciTE4AutoIt3.exe", "FileDescription") &@CRLF)

This outputs the correct string "SciTE4AutoIt3 full installer"

but if the parameter is "FileVersion"

result is: " ${MyVersion}"


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Share this post


Link to post
Share on other sites

Hello. THe issue is in SciTE4AutoIt3.exe

 

check:

 

4ce31b41ad8e43c8834713b8924690f2.png

 

 

 

Saludos

 

Share this post


Link to post
Share on other sites

I see this was submitted as a Bug report, but it is working fine as far as I can tell. FileGetVersion() with a second parameter will return the value for that field in the "StringFileInfo" information block and the actual value is returned:

1 VERSIONINFO
FILEVERSION 16,1224,1708,0
PRODUCTVERSION 16,1224,1708,0
FILEOS 0x4
FILETYPE 0x1
{
BLOCK "StringFileInfo"
{
    BLOCK "04090000"
    {
        VALUE "Comments", "Installer containing a modified SciTE version with many extra utilities."
        VALUE "CompanyName", "Jos van der Zande"
        VALUE "FileDescription", "SciTE4AutoIt3 full installer"
        VALUE "FileVersion", "${MyVersion}"
        VALUE "LegalCopyright", "© Jos van der Zande"
        VALUE "LegalTrademarks", "Jos van der Zande"
        VALUE "ProductName", "SciTE4AutoIt3"
    }
}

BLOCK "VarFileInfo"
{
    VALUE "Translation", 0x0409 0x0000  
}
}

I will fix the issue with the MyVersion in there in the NSIS installer.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Ok, Thank you.


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

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

  • Similar Content

    • ur
      By ur
      In the present product I have version in the About section as  4 section one like (10.00.00.2456)
      And the version in other products I have version number like (97.000.2456 , 10.000.2345)
       
      Is there any UDF or function to convert 4 digit format to 3 digit one.?
      I need that for version comparison of different products.
    • rodent1
      By rodent1
      This is a simple and small console app, but it's been useful.
      When a software installation does not work, it allows me to compare file versions with a working installation.

      Usage:
      VnComp <Folder1> <Folder2> [-c] [-d] [-r]
      Folder1 is a folder for a software version that does not work right (UNC path OK)
      Folder2 is a folder for a software version that does work fine (UNC path OK)
      -c or /c: show files with same versions
      -d or /d: show files with different versions
      -r or /r: compare files in subfolders as well

      enjoy
      VnComp.au3