Jump to content

MSI Editor. A database ?!


ptrex
 Share

Recommended Posts

MSI Editor - a Database ?

Some time ago some guys where discussing a topic about running a MSI file in AU3.

This lead to this thread.

For those who don't know MSI.

The Windows Installer (previously known as Microsoft Installer, codename Darwin) is an engine for the installation, maintenance, and removal of software on modern Microsoft Windows systems. The installation information, and often the files themselves, are packaged in installation packages, loosely relational databases structured as OLE Structured Storage Files and commonly known as "MSI files",

From Wikipedia, the free encyclopedia.

For those who are interested in building an MSI file, this is the MS Opensource alternative (from MS itself)

WiX - Opensource MSI

This Editor written in AU3 let you edit the content of an MSI file. You will find plenty of them on you harddrive as I presume.

Well for most of you it will be a revelation that an MSI file is in fact a DB.

So you can use the MSI to store data in. As a replacement for MS Access or SQLite or whatever.

Nevertheless a new database is old wine in new bags for AU3 users. There are plenty of alternatives.

So why create an editor than ?

Well here is where the fun starts.

An MSI file contains conditions that influences the installation of an application. And some times you want to change that.

Because the build in rules prevent you from installing the apps.

Let's give an practical example where a software builder, built in a rule that says that his software only runs on a machine with the OS XP.

Well now you have a machine with VISTA. This way you can alter the content of the MSI and get rid of the rule that prevents you from installing.

Some functions still need improving, but this will give you already a good idea of what I am talking about.

MSI_EditorGui.au3

New Version for 3.2.11.12

Added support for *.MSP files.

Thanks to IGORM.

MSI_EditorGui_New.au3

Enjoy !!

regards,

ptrex

Edited by ptrex
Link to comment
Share on other sites

Link to comment
Share on other sites

Wow this is interesting. I figured Microsoft would have offered licenses to make MSI files instead of releasing the source. How many other Windows specific utilities produced by Microsoft directly, are open source?

Well, I had a little trouble understanding how it worked when I first downloaded it. With some work, it could look really nice.

Link to comment
Share on other sites

@bluebearr

Because you don't need to install the full SDK when using the AU3.

You can run the MSI Editor for a USB Stick and carry it around.

Not sure if that's possible with the ORCA.

But it is a good addition to the AU3 editor.

Thanks for sharing.

Regards

ptrex

Link to comment
Share on other sites

  • 1 month later...

this allready looks way cooler than orca (orca looks like excel's ugly cousin) this app looks nice and simple.

can 't wait to see where you go with this project.

verry nice work!

If you need ORCA but don't want the SDK, then you can download a standalone installer from a link on Aaron Stebner's blog here

Link to comment
Share on other sites

Thanks, this is really nice.

I can't view the data for records in the binary table.

I get one error for every record in the table:

post-10782-1188583823_thumb.jpg

Edit:

The same deal with the Icon table

The File, Shortcuts and Dialog tables do not show any records, eventhough there should be something in there.

RK

Edited by rbhkamal

"When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix

Link to comment
Share on other sites

Well here is where the fun starts.

An MSI file contains conditions that influences the installation of an application. And some times you want to change that.

Because the build in rules prevent you from installing the apps.

Let's give an practical example where a software builder, built in a rule that says that his software only runs on a machine with the OS XP.

Well now you have a machine with VISTA. This way you can alter the content of the MSI and get rid of the rule that prevents you from installing.

Some functions still need improving, but this will give you already a good idea of what I am talking about.

Thanks for giving a practical example for us noobs! It really is amazing to see what can be done with autoit! Here are a few minor items I though you'd like to know.

1 - after loading an .msi file the script continues to say "No database Open". Not sure if its suppose to be that way or not, but would might make more sense is to list the full filename.

2 - script Errors with "No Database Loaded !!" when a .msi file loaded and you click

  • File > Open/Create Database
  • Cancle out of the Select a MSI file... dialog
  • Click any of the TreeView items
3 - after getting the above error if you click
  • File > Close Database
  • Ok the "No Database Loaded !!" error
  • script crashes
This is what is reported in my console

Type 11592

Cnt 1

Col Name ModuleID

---------

Type 9474

Cnt 2

Col Name Language

---------

Type 3360

Cnt 3

Col Name Version

---------

\\Win--xp--001\E\Workgroup\_AutoIt Scripts\test.au3 (366) : ==> Error in expression.:

$ViewT = $DB.OpenView ("SELECT `Name` FROM `_Columns` WHERE `Table` ='" & $sTabName & "'")

$ViewT = ^ ERROR

->AutoIT3.exe ended.rc:1

>Exit code: 1 Time: 33.651

Again pretty cools stuff, how the feedback helps!
Link to comment
Share on other sites

Link to comment
Share on other sites

  • 2 weeks later...

ptrex you are my hero.

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
Link to comment
Share on other sites

Link to comment
Share on other sites

  • 5 months later...

I am fairly new to AutoIt and cant quite figure out why I am getting an error on line 20 with this MSI editor.

error follows

--------------------------------------------------

Line 20

Global Const $WM_NOTIFY=0x004E

Global Const ^ERROR

Error: Can not redeclare a constant

---------------------------------------------------

Any ideas are appreciated.

I am running this on Windows XP

using the latest version of AutoIT v.3

Thanks,

Chris

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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