Archive: Windows Installer (MSI)


Windows Installer (MSI)
Will there ever be consideration for support of Windows Installer, .msi, .msm. extensions, etc.
I would love to help such developement. I am sure others would too.
A Windows Installer table can be created that is fast and has little overhead. I thought maybe in the future NSIS could include support for .msi functions.

Just a thought.
:p
:cool:


This kind of a change is quite huge. Let us first finish NSIS 2 :D


A great idea, but I agree with kichik. By the way, reading msi-files also comes with a lot of changes to the code, and not all functions are supported.


I thought about MSI again (compare http://forums.winamp.com/showthread....hreadid=241434) and have some ideas to share.

I think, reading MSI might be one thing but the bigger advantage I see would be storing standard NSIS installers as MSI package so companies can use MSI to deploy packages to machines automatically. NSIS support /S (silent) but this does not integrate into Microsoft standard tools.

One basic idea (already posted somewhere) is to build a simple MSI package just containing the installer.exe and calling this on the target machine using some start-up registry key. This would require rebooting.

On other idea: MSI packages can contain COM dlls. We could use a fake COM dll which as DllRegisterServer implemented. This DLL could contain the NSIS installer (data after the code) and the DllregisterServer could extract the installer and run it with /S (silent). This way we could use some static wrapper dll (kind of stub, could be included by NSIS) and don't have to change anything within our installers (I don't want to limit the actions to standard MSI actions, so translation my scripts is no option to me -- that's why I use NSIS). And this would not require reboot (in general). Maybe giving the reboot flag of NSIS back to MSI would be a good idea, too.

The only thing we would need to add to our scripts:

OutFileMsi "myinstaller.msi"

Any more thoughts/ideas out there?


i am dying for a good msi packager and nsis would dominate in this area.

even if it was just an msi that would contain an exe inside and then execute it - that would be better than nothing at all.

right now the only tools out there are total crap, or crippled freeware.

even still, i don't want to learn how to program my installer differently... the exe's i make with nsis can do some very tricky stuff. i don't want to have to figure out how to get everything to work via msi programming just because i am forced to use msi files for active directory installations.

it's bad enough i have to repackage all of my exe's that microsoft now considers "legacy software".

what a crock of sh--!

anyway, any decent workable nsis-msi solution right now would PWN.

thanks,

sgt


I've already build a basic dll implementing DllRegisterServer which runs some EXE. Currently cannot find time to continue this.

One problem is to get the installer to the disk. It cannot be extracted by DllRegisterServer itself because DllRegisterServer does not know the path of the dll itself (without process list tricks). Currently I plan this solution:
Build an MSI containing EXE and fake-DLL. First extract EXE, then store EXE's path somewhere (registry?), then extract fake-DLL and register it (dll runs EXE).

One more problem: What about reboot? It would be great if the MSI installer knows whether to reboot. So we would have to store the reboot flag when quitting NSIS installer (e.g. registry) and DllRegisterServer or MSI "script" should read this value and see it as MSI reboot flag. Does someone know how reboot in MSI works?

I already tried ORCA (MS Platform SDK) and WiX for building/editing MSI. Had no time to continue here (I think WiX is the better solution).


The DLL can figure out its path by saving hInstance in DllMain and then using it with GetModuleFileName. To pass on the reboot flag, you can use the error level value.


@kichik: How to get the error level value back to Windows Installer? AFAIK error level is something an exe file will "return" (process attribute). What I want to do is calling DllRegisterServer on some DLL.

I could easily store the reboot flag into registry or in some file. How to get MSI to "read" this?


I don't know how MSI handles this. It probably has some kind of ProcessExitCode property in its database.


Correct, I've done this. It is a programmers nightmare to do however.

If one one wants to go the NSIS way with MSI packages:

You NEED the ORCA tool from Microsoft and then create an custom action which calls your silent NSIS setup exe.

TIP:
I think you better start using MAKEMSI ( http://www.dennisbareis.com/ ) it free and quite easy to learn.


hello,

when is it planned to integrate MSI-package creation into NSIS?

now we have running our setup-routines under nullsoft, but for Windows Vista Certification, we aspire in the next half year, we need MSI packages.

it will save a lot of work to us, when not to reorganize our setups.

Thanks in advance
Thomas


... "but for Windows Vista Certification, we aspire in the next half year, we need MSI packages"...

"aspire" ? I'm more tempted to say you are forced by Microsoft. Note that not even all their Windows Vista apps come in MSI packages.

Note that MSI is very limited to what an installer should do (not taking into account custom action ofcourse)

Anyhow, feel free to help improving NSIS and MSI combination by writing your efforts and solution in a Wiki.