Community Forums
Results 1 to 3 of 3

Thread: Query MSI Database for File Version

  1. #1
    Join Date
    Oct 2004
    Location
    Melbourne, Australia
    Posts
    47

    Question Query MSI Database for File Version

    I'm writing a Custom Action DLL in C++ that needs to report the version of a file being installed before the file is actually installed.

    Can this be done? How? Any code examples?

    I've tried using the API call MsiGetFileVersion..

    MsiGetFileVersion(szFileName, *szFileVersion, &dwBuffer, 0, 0);

    ..but I get an error when compiling that says..

    Error: Unresolved external MsiGetFileVersionA

  2. #2
    Join Date
    Oct 2001
    Location
    Here and there
    Posts
    16,243
    That API might be intended for files already on the target system; to read the version from the File table at run time, perhaps see this InstallShield newsletter article: http://www.installshield.com/news/ne.../msiaccess.asp.

  3. #3
    Join Date
    Apr 2003
    Location
    Pittsburgh
    Posts
    52
    Need to reference MSI.lib and some header files, I think MSIQUERY.h
    It works on my development system....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •