Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

MSI Editor. A database ?!


  • Please log in to reply
29 replies to this topic

#1 ptrex

ptrex

    Universalist

  • MVPs
  • 2,420 posts

Posted 30 July 2007 - 10:55 AM

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.


Attached File  MSI_EditorGui.au3   18.57KB   1720 downloads

New Version for 3.2.11.12

Added support for *.MSP files.
Thanks to IGORM.

Attached File  MSI_EditorGui_New.au3   19.46KB   1643 downloads

Enjoy !!

regards,

ptrex

Edited by ptrex, 14 September 2012 - 09:34 AM.








#2 James

James

    Universalist

  • MVPs
  • 10,353 posts

Posted 30 July 2007 - 12:35 PM

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, 30 July 2007 - 12:37 PM.


#3 Toady

Toady

    Easy there turbo...

  • Active Members
  • PipPipPipPipPipPip
  • 698 posts

Posted 30 July 2007 - 12:52 PM

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

Edited by Toady, 30 July 2007 - 12:52 PM.

www.itoady.com (Go here to download the MacroGamer installer)

#4 mrbond007

mrbond007

    License To Script

  • Active Members
  • PipPipPipPipPipPip
  • 422 posts

Posted 30 July 2007 - 01:06 PM

You're on your way to glory :)

#5 ptrex

ptrex

    Universalist

  • MVPs
  • 2,420 posts

Posted 30 July 2007 - 01:13 PM

@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

#6 Richard Robertson

Richard Robertson

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 10,333 posts

Posted 30 July 2007 - 01:40 PM

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.

#7 gseller

gseller

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,057 posts

Posted 30 July 2007 - 02:26 PM

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!

#8 bluebearr

bluebearr

    Prodigy

  • Active Members
  • PipPipPip
  • 184 posts

Posted 30 July 2007 - 03:19 PM

This is pretty...

but how is this better than ORCA?
BlueBearrOddly enough, this is what I do for fun.

#9 ptrex

ptrex

    Universalist

  • MVPs
  • 2,420 posts

Posted 30 July 2007 - 04:15 PM

@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

#10 lordofthestrings

lordofthestrings

    Polymath

  • Active Members
  • PipPipPipPip
  • 226 posts

Posted 31 July 2007 - 07:11 AM

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!

#11 abritton

abritton

    Seeker

  • New Members
  • 3 posts

Posted 31 August 2007 - 11:26 AM

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

#12 rbhkamal

rbhkamal

    I just can't leave this forum!!!!!

  • Active Members
  • PipPipPipPipPipPip
  • 503 posts

Posted 31 August 2007 - 06:11 PM

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:
error.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, 31 August 2007 - 06:24 PM.

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

#13 ssubirias3

ssubirias3

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 355 posts

Posted 31 August 2007 - 08:20 PM

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!

#14 ptrex

ptrex

    Universalist

  • MVPs
  • 2,420 posts

Posted 01 September 2007 - 03:11 PM

@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

#15 slayerz

slayerz

    Prodigy

  • Active Members
  • PipPipPip
  • 160 posts

Posted 10 September 2007 - 05:19 AM

thank ptrex , I really2 like your apps! :)
AUTOIT I'm lovin' it!

#16 ptrex

ptrex

    Universalist

  • MVPs
  • 2,420 posts

Posted 10 September 2007 - 01:33 PM

@slayerz

You are welcome.

Enjoy !!

ptrex

#17 JRSmile

JRSmile

    MCSE 2012R2

  • Active Members
  • PipPipPipPipPipPip
  • 461 posts

Posted 10 September 2007 - 05:17 PM

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

#18 ptrex

ptrex

    Universalist

  • MVPs
  • 2,420 posts

Posted 10 September 2007 - 07:15 PM

@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

#19 cmgrider

cmgrider

    Seeker

  • Active Members
  • 6 posts

Posted 13 February 2008 - 02:47 PM

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

#20 AlmarM

AlmarM

    Programming my way.

  • Active Members
  • PipPipPipPipPipPip
  • 1,694 posts

Posted 14 February 2008 - 01:36 PM

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.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users