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
- :
- How can I detect if logging is enabled from a custom action in C++ DLL ?
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
Nov 12, 2009
07:20 AM
How can I detect if logging is enabled from a custom action in C++ DLL ?
Hi,
I want to detect, if logging file is enabled, from a custom action which is implemented in a C++ DLL.
I've tried using
but it always return FALSE, and I assume it is because of it falls under the condition of "Obtaining Context Information for Deferred Execution Custom Actions" (see http://msdn.microsoft.com/en-us/library/aa370543(VS.85).aspx )
I've also tried to check if command line arguments for logging were passed to the setup.exe, however when custom action is called, the current process is msiexec.exe (whose parent is also msiexec.exe) and I don't know how to get from this process to the original setup.exe which was executed by the user.
So this doesn't work either.
Any help is appreciated,
10x,
Si.
I want to detect, if logging file is enabled, from a custom action which is implemented in a C++ DLL.
I've tried using
MsiGetMode(hInstall, MSIRUNMODE_LOGENABLED)
but it always return FALSE, and I assume it is because of it falls under the condition of "Obtaining Context Information for Deferred Execution Custom Actions" (see http://msdn.microsoft.com/en-us/library/aa370543(VS.85).aspx )
I've also tried to check if command line arguments for logging were passed to the setup.exe, however when custom action is called, the current process is msiexec.exe (whose parent is also msiexec.exe) and I don't know how to get from this process to the original setup.exe which was executed by the user.
So this doesn't work either.
Any help is appreciated,
10x,
Si.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 19, 2009
12:41 PM
i'd try querying the [MsiLogging] property. if you are running in deferred mode, you need to pass this information into the custom action by means of a "SetAProperty" CA. set a property, the name of which being the name of your CA, and the value of which being [MsiLogging]. from within your CA, call MsiGetProperty( hMSI, "CustomActionData" ).
search the forum for "CustomActionData" and "Deferred execution" and you'll get plenty of information on this whole situation.
search the forum for "CustomActionData" and "Deferred execution" and you'll get plenty of information on this whole situation.