This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: ExitCode Property?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 09, 2012
06:54 PM
ExitCode Property?
Ok, been beating my head against the wall too long at this. So, heres the story...
I created a generic MST and have it successfully creating the history of installations in the registry. The last thing I am trying to do is get the exitcode. What property or method can I use to determine what the exitcode of the install is?
Example of what I have:
HKLM\SOFTWARE\Contoso\InstallHistory\[ProductName] [ProductVersion] - [Date] - [Time]
name\values in the key are like:
InstalledFrom = [OriginalDatabase]
Transforms = [TRANSFORMS]
etc.
I also need something like this:
ErrorCode = [ErrorCode]...or whatever this property may be.
So in the end it would look like this:
ErrorCode = 0
or ErrorCode = 1614
or ErrorCode = 1624
With the error code I could even add the error message to this reg key. I've looked all over the forums and the net. Am I missing something? It is probably so simple and staring me in the face. :confused:
I've looked at session.property, session.installer, installer... The only thing that comes to mind now is setting the MsiLogging property and parsing the output. There must be a better way!
And help greatly appreciated!
I created a generic MST and have it successfully creating the history of installations in the registry. The last thing I am trying to do is get the exitcode. What property or method can I use to determine what the exitcode of the install is?
Example of what I have:
HKLM\SOFTWARE\Contoso\InstallHistory\[ProductName] [ProductVersion] - [Date] - [Time]
name\values in the key are like:
InstalledFrom = [OriginalDatabase]
Transforms = [TRANSFORMS]
etc.
I also need something like this:
ErrorCode = [ErrorCode]...or whatever this property may be.
So in the end it would look like this:
ErrorCode = 0
or ErrorCode = 1614
or ErrorCode = 1624
With the error code I could even add the error message to this reg key. I've looked all over the forums and the net. Am I missing something? It is probably so simple and staring me in the face. :confused:
I've looked at session.property, session.installer, installer... The only thing that comes to mind now is setting the MsiLogging property and parsing the output. There must be a better way!
And help greatly appreciated!
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 10, 2012
08:16 PM
Ok, I guess its not possible to get the exitcode of the msiexec that originally executed the MSI because the windows installer service hasn't closed it yet. Right? So, I...
Capture the PID of the original msiexec in a CA, then I run an asynchronous EXE that I created which uses kernel32's OpenProcess and GetExitCodeProcess functions. I loop until OpenProcess shows the PID is no longer pending and get the exitcode using the GetExitCodeProcess function. Now I can update my audit key with the exitcode of the actual install.
This should not that difficult to do but it appears that there is no other way. That I can think of atleast...
Capture the PID of the original msiexec in a CA, then I run an asynchronous EXE that I created which uses kernel32's OpenProcess and GetExitCodeProcess functions. I loop until OpenProcess shows the PID is no longer pending and get the exitcode using the GetExitCodeProcess function. Now I can update my audit key with the exitcode of the actual install.
This should not that difficult to do but it appears that there is no other way. That I can think of atleast...