extracting properties from MSI file without installing

R

rbebawy

Hi
iam trying to programatically extract information from the msi file
without installing the product, i managed to create an AAS file but so
far didn't find any function that would get info like version number,
product name and so on without installing the product. iam using C# on
dot net and any help is appreciated.
 
A

AJ

The only way I know how to do this on products that are NOT installed
is to execute an SQL query on the MSI database itself. I know this can
be done with the OpenView method of the Database object. I am not sure
if this can be translated to C# as I am not a C# programmer, but I know
it can be done in VBScript.

Sorry I can not be of further assistance.

-AJ
 
C

Carolyn Napier [MSFT]

If you have the .aas file, use the script "wilstscr.vbs" provided in the Windows
Installer SDK to dump the contents of the file. Alternatively, you can use the
MsiOpenDatabase, MsiDatabaseOpenView, MsiViewExecute, and MsiViewFetch API in
combination with assorted SQL queries to obtain/collect information from the
package.

For example, you could obtain the ProductVersion via the SQL query "SELECT
`Value` FROM `Property` WHERE `Property`='ProductVersion'".

- Carolyn Napier

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

MSI FAQ:
<http://www.microsoft.com/windows2000/community/centers/management/msi_faq.mspx>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top