Archive: How to execute Microsoft (msi) installer from NSIS installer


How to execute Microsoft (msi) installer from NSIS installer
Any help is appreciated!


This thread should help you figure it out. To get more information about msiexec you should probably search MSDN.


Execwait "$INSTDIR\sw\psqlodbc.msi" does not work!!
any help is appreciated!!


Please stop creating a new thread for every following question you have. It makes things much harder to track.

As the thread linked says you need to use msiexec like this:
ExecWait '"$SYSDIR\msiExec" /i "file.msi"'

ExecShell should probably work too (with no msiExec) but it won't wait for it.


thanks and sorry
I am new to this NSIS thing & I did not know of any guidelines regarding posts to this board...will not bother you anymnore


Bother as much as you'd like, just try to make it easy to read and follow.


Related Question
If I want to do ExecWait on a .cpl file would I do the following?

ExecWait "$SYSDIR\odbccp32.cpl"


Nope. A .cpl is not an executable, but rundll32.exe which executes it is. Try this:

ExecWait 'rundll32.exe shell32.dll,Control_RunDLL "$SYSDIR\odbccp32.cpl",'


Almost There
The command you gave me did pop up the ODBC DSN Control Dialog but my other installer stuff continued?

ExecWait 'rundll32.exe shell32.dll,Control_RunDLL "$SYSDIR\odbccp32.cpl",'


Try:

System::Call "shell32::Control_RunDLLA(i $HWNDPARENT, i 0, t '$SYSDIR\odbccp32.cpl', i 5)"

If that doesn't work, try:

System::Call "kernel32::GetModuleHandleA(i 0) i .r0"
System::Call "shell32::Control_RunDLLA(i $HWNDPARENT, i r0, t '$SYSDIR\odbccp32.cpl', i 5)"


Almost There
Both commands I tried produced some funky behaviour:
- both opened 5 windows of "Create Data Source Name" and they were hard to close/cancel (had to resort to task manager).

Any ideas? Thanks!!


Weird, works fine for me. Can you attach the script you've used?


Me Bad!! The very first command you sent me worked !!
Thanks a million!!!

This one does work!
ExecWait 'rundll32.exe shell32.dll,Control_RunDLL "$SYSDIR\odbccp32.cpl",'


Installing MSI closes other applications
Hi all,

I'm installing a MSI using the following command:

nsExec::Exec 'MsiExec.exe /q /i $TEMP\MSRuntime71.msi' $0

and it works fine except that it is terminating all running applications without alerting the user.

I've searched the Microsoft site:
http://technet.microsoft.com/en-us/l.../cc759262.aspx

and also looked at the command instructions, but I'm not sure what is the correct approach to handling this. (Plus the descriptions aren't clear.)

Ideally it would be nice to instruct the user to shut down application X.

Thanks in advance!