GetFileVersion for MSI

  • Print

Indigo Rose products feature the MSI.GetFileVersion() Lua action to retrieve the Version and Language from PE files (*.exe and *.dll). However, if you may want to know these strings of a MSI package (*.msi), you can use this Lua code below:

 
info = {};
nPackageHandle = MSI.OpenPackage("setup.msi");
error = Application.GetLastError();
if (error ~= 0) then
    Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
    info.Version = MSI.GetProductProperty(nPackageHandle, "ProductVersion");
    info.Language = MSI.GetProductProperty(nPackageHandle, "ProductLanguage");
  -- display the Version and Language strings in the debug window
    Debug.ShowWindow();
    Debug.Print("MSI Version: " .. info.Version .. "\r\n");
    Debug.Print("MSI Language: " .. info.Language .. "\r\n");
end
 
 

Add a comment (For questions, please use the contact form!)

Security code
Refresh

Our Plugins & Examples Feed

  • HTTP Actions plugin updated to 2.1.0.0

    Two new actions were added to the HTTP plugin:

    • HTTP.ResumeDownload()
    • HTTP.ResumeDownloadSecure()

    With these new "Resume" actions, you can...

  • Unicode Actions plugin updated to 2.0.3.0

    A new version of the Unicode actions plugin was released.

    Changes were made to the code...

Subscribe now!

Customer Login



mindquake.com.br Webutation

Click to check at AVG ThreadLabs

All installers digitally signed

Click to visit McAfee SiteAdvisor

Mindquake.com.br is gold certified

PageRank Checker