File.GetVersionInfo |
|
|
|
File.GetVersionInfo |
|
|
|
|
||
OverviewExamples
version_info = File.GetVersionInfo( _WindowsFolder .. "\\Doopernator\\Doopernator.exe");
fv = version_info.FileVersion;
pv = version_info.ProductVersion;
Gets the version info for the "C:\Windows\Doopernator\Doopernator.exe" file and stores it in a table named version_info. Then copies the file version and product version from that table into variables named fv and pv, respectively.
-- Get the file information, and load it into a table
tVersionInfo = File.GetVersionInfo(_SourceDrive .. "\\setup.exe");
-- Get the last error code
nError = Application.GetLastError();
if nError == 0 then
-- There was not an error
sOutput = "";
-- Traverse the table, storing info in a string
for Name, Contents in tVersionInfo do
sOutput = sOutput .. Name .. ": " .. Contents .. "\r\n";
end
-- Output string contents to the user
Dialog.Message("File Version Information", sOutput);
else
-- There was an error, alert the user
Dialog.Message("Error", _tblErrorMessages[nError]);
end
Retrieves the version information from the file "setup.exe, and presents it to the user in a single dialog message.
See also: Related Actions
Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us