Jump to content

Recommended Posts

Posted (edited)

i write this func for the get version of msi file:

Func get_msiversion($FilePath)
    If Not FileExists($FilePath) Then Return SetError(1, 0, 0)
    Dim $installer, $database, $view, $result
    $installer = ObjCreate("WindowsInstaller.Installer")
    $database = $installer.OpenDatabase ($FilePath, 0)
    if @error Then Return SetError(2, 0, 0)
    $view = $database.OpenView ("SELECT Value FROM Property WHERE Property='ProductVersion'")
    $view.Execute
    $result = $view.Fetch
    Return $result.StringData(1)
EndFunc

but I prefer use dllcall. sameone can help me to do this?

Edited by shai
Posted

MsiGetFileVersion is a function that reads the version resource information from a PE file (.exe or .dll) the same way the Windows Installer does. It will not get you the version information out of an MSI. Use the MsiGetProduct... functions to get this information.

Posted (edited)

you mean "return type"?

 

No.  Calling convention has to do with order of parameters passed to function calls.  If the calling program and called function don't use the same conventions the data passed in will be scrambled.  Also it can cause the program to crash.  For detailed explanation you should search.

Edit:  this should get you started.

http://en.wikipedia.org/wiki/Calling_convention

Edited by MilesAhead

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...