473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

MsiLib

Hi,

I am trying to figure out how to use msilib to extract the registry
information from an MSI file and I really could use a good example of
how that is accomplished or even just an example using msilib in
general. Does anybody happen to know of an example for this as I
wasn't able to find one? If there isn't one, would anybody be willing
to throw one together?

Thanks
Charlie

Aug 22 '07 #1
1 3997
I am trying to figure out how to use msilib to extract the registry
information from an MSI file and I really could use a good example of
how that is accomplished or even just an example using msilib in
general. Does anybody happen to know of an example for this as I wasn't
able to find one? If there isn't one, would anybody be willing to throw
one together?
You need to look at the Registry table, whose structure is described here:

http://msdn2.microsoft.com/en-us/library/Aa371168.aspx

In particular, the fields you need to look at are Key, Name,
and Value. Notice that Value is Formatted, so you may have to
expand the formatting first (looking at further tables possibly).

The rough sequence of actions would be

db = msilib.OpenDatabase(path, MSIDBOPEN_READONLY)
view = db.OpenView("SELECT Key, Name, Value FROM Registry")
while True:
record = view.Fetch()
if not record: break
print record.GetString(1), record.GetString(2), record.GetString(3)

Unfortunately, GetString is not implemented yet, so it might be that
what you want to do is not possible yet.

HTH,
Martin
Aug 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Salerno | last post by:
Hi everyone. I'm updating my UltraEdit syntax file for Python 2.5 and was wondering if anyone knew of other additions to make besides these. I found all of these in the What's New document, but...
0
by: imageguy | last post by:
I have been using InnoSetup to distribute my wxpython app and ir works great, howver, I would like to offer a *.msi installer to customers as an option and this isn't available using Innosetup. ...
2
by: Virgil Stokes | last post by:
I would appreciate python code for creating *.cab files. --V. Stokes
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.