Sign in to follow this  
Followers 0

MSI Editor. A database ?!

30 posts in this topic

Posted (edited)

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

Share this post


Link to post
Share on other sites



Posted (edited)

I want to be the first to say,

OMG!!!

You have made my day! I have needed something like this for ages. Thankyou so MUCH!!!!!!!!!!

Edited by NeoTroniX

Share this post


Link to post
Share on other sites

Posted (edited)

Wow, nicely done! This is very useful and informative.

Edited by Toady

Share this post


Link to post
Share on other sites

Posted

You're on your way to glory :)

Share this post


Link to post
Share on other sites

Posted

@all

Thanks for the feedback. :)

If the time permits I will add more features like : -

- Exporting the embedded CAB files

- More Error control

- etc.

Regards,

ptrex

Share this post


Link to post
Share on other sites

Posted

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.

Share this post


Link to post
Share on other sites

Posted

Oh WOW... Sweet!! Works great opening an existing msi but errors out on me when I go to create a new one. I will have to do some more playing to see what it is finding wrong.

Thanks for sharing!

Share this post


Link to post
Share on other sites

Posted

This is pretty...

but how is this better than ORCA?

Share this post


Link to post
Share on other sites

Posted

@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

Share this post


Link to post
Share on other sites

Posted

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!

Share this post


Link to post
Share on other sites

Posted

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

Share this post


Link to post
Share on other sites

Posted (edited)

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

Share this post


Link to post
Share on other sites

Posted

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!

Share this post


Link to post
Share on other sites

Posted

@all

Thanks for mentioning the ERRORS.

But this is not surprising since this is still work in progress.

As time permits I will update the main code.

regards

ptrex

Share this post


Link to post
Share on other sites

Posted

thank ptrex , I really2 like your apps! :)

Share this post


Link to post
Share on other sites

Posted

@slayerz

You are welcome.

Enjoy !!

ptrex

Share this post


Link to post
Share on other sites

Posted

ptrex you are my hero.

Share this post


Link to post
Share on other sites

Posted

@JRSmile

You guys are easy to please :)

Bevause the MSI database editor is not working fully yet, still under construction.

But thanks anyhow.

Regards,

ptrex

Share this post


Link to post
Share on other sites

Posted

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

Share this post


Link to post
Share on other sites

Posted

WOW nice made

There WILL BE a day im ready to understand this script :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0