Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 7th September 2009, 11:06   #1
SB17
Junior Member
 
Join Date: Sep 2009
Posts: 8
Getting the msiexec return code

Hello everyone!

I have built an installer(using NSIS) which has couple of MSIs embedded inside it. I execute these constituent MSIs by invoking "msiexec" thru ExecWait.
(For example --> ExecWait 'msiexec.exe /qn /i embedded.msi TARGETDIR="$INSTDIR"' $0)

Can anyone tell me a way to get the error code for the above msiexec call in my nsi script?

Neither the System::Call "Kernel32::GetLastError() nor the ExecWait return value seems to do the trick!!!

Any help will be appreciated!

Thanks,
SB
SB17 is offline   Reply With Quote
Old 7th September 2009, 11:59   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,336
The return value of msiexec.exe is in $0.

GetLastError() is only for the current process, so it won't help you anyway.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th September 2009, 04:51   #3
SB17
Junior Member
 
Join Date: Sep 2009
Posts: 8
Thanks kichik, but that doesnt seem to work for me. I always seem to get "0" in $0 as the return value (even when msiexec.exe fails to install the msi as a result of some error thrown by the msi).


Thanks,
SB.
SB17 is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump