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
- :
- Detecting Deferred mode with Managed Custom Actions
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
‎Feb 09, 2010
02:44 PM
Detecting Deferred mode with Managed Custom Actions
Hello,
Anyone have a sample snippet on how they are detecting deferred mode from inside their managed C# DLL? I see there is Msi.Runmode which is similair to what I used to use for my C++ DLL, but I haven't had any luck using it. Right now I check my incoming variables for empty values, but that's just a bandaide for now.
Also I do know about DTF, but choose not to use it for now... 🙂
Thanks!
-Mike
Anyone have a sample snippet on how they are detecting deferred mode from inside their managed C# DLL? I see there is Msi.Runmode which is similair to what I used to use for my C++ DLL, but I haven't had any luck using it. Right now I check my incoming variables for empty values, but that's just a bandaide for now.
Also I do know about DTF, but choose not to use it for now... 🙂
Thanks!
-Mike
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 10, 2010
01:15 PM
If you're using the InstallShield.Interop.Msi assembly, your code might look something like below. If not, you can use your own P/Invoke to MsiGetMode() to find this out.
Msi.Install install = Msi.CustomActionHandle(handle);
bool deferred = install.GetMode(Msi.RunMode.Scheduled) || install.GetMode(Msi.RunMode.Commit) || install.GetMode(Msi.RunMode.Rollback);
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 10, 2010
01:23 PM
MichaelU wrote:
If you're using the InstallShield.Interop.Msi assembly, your code might look something like below. If not, you can use your own P/Invoke to MsiGetMode() to find this out.Msi.Install install = Msi.CustomActionHandle(handle);
bool deferred = install.GetMode(Msi.RunMode.Scheduled) || install.GetMode(Msi.RunMode.Commit) || install.GetMode(Msi.RunMode.Rollback);
Thank you Michael!