Sign in to follow this  
Followers 0

MSI Editor. A database ?!

30 posts in this topic

#1 ·  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



#2 ·  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

#3 ·  Posted (edited)

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

Edited by Toady

www.itoady.com (Go here to download the MacroGamer installer)[list][*]A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding[*]MacroGamer - (Please Like this AutoIt thread on Facebook)[/list]

Share this post


Link to post
Share on other sites

#6 ·  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

#7 ·  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

#8 ·  Posted

This is pretty...

but how is this better than ORCA?


BlueBearrOddly enough, this is what I do for fun.

Share this post


Link to post
Share on other sites

#9 ·  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

#10 ·  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

#11 ·  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

#12 ·  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

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

Share this post


Link to post
Share on other sites

#13 ·  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

#15 ·  Posted

thank ptrex , I really2 like your apps! :)


AUTOIT[sup] I'm lovin' it![/sup]

Share this post


Link to post
Share on other sites

#17 ·  Posted

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:-)

Share this post


Link to post
Share on other sites

#19 ·  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

#20 ·  Posted

WOW nice made

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


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

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