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
- :
- When to run custom action ?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Aug 31, 2009
02:22 PM
When to run custom action ?
I have a custom action that runs devcon to install a device driver. When in the install sequence am I supposed to put it ? I tried putting it in a couple places like 'After InstallServices' but it always fails with an error about something missing, and if I look in Windows explorer at the install dir before I acknowledge the error popup, there's no installed files yet. The only place so far I've been able to get it to works is if I put it after InstallFinalize. Should the files be in place anywhere in the sequence after InstallFiles ?
(5) Replies
‎Aug 31, 2009
04:39 PM
Your custom action is most likely set to "Immediate Execution". If you want it to be in the transacted phase of the installation, then you probably want it to be set to "Deferred Execution".
See here for more info.
Keep in mind that custom actions run in deferred execution don't have the same access to properties that ones run in Immediate Execution do. You can search for more info on that if it becomes an issue.
See here for more info.
Keep in mind that custom actions run in deferred execution don't have the same access to properties that ones run in Immediate Execution do. You can search for more info on that if it becomes an issue.
‎Sep 02, 2009
12:53 PM
You can set it as Deferred in System Context and sequence it after InstallFiles.
Hope this helps.
Hope this helps.
‎Sep 09, 2009
09:30 AM
Thanks for the pointers. I got it to work using Deferred Execution. Related question: how do I prevent the action from running during an uninstall ? It keeps trying to install the driver during the uninstall and causing an error.
‎Sep 09, 2009
11:23 AM
You can put a condition on your custom action.
- Not REMOVE="ALL" will run only if the product is not being completely uninstalled (first time install and maintenance).
- Not Installed will run only when the product is being installed and is not already installed (first time install only).
- In addition, you can use conditions utilizing the Feature and Component State values (see the bottom of the help topic "Conditional Statement Syntax") for finer control.