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: Skip Custom Action when Re-running Setup
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 11, 2009
08:17 AM
Skip Custom Action when Re-running Setup
I am an InstallShield novice and I am new to custom actions, so I apologize in advance if this is a trivial issue.
I have a single setup.exe that installs a windows application and lays down several database script files that are run using through a custom action which calls a custom MSBuild script.
When I run the setup.exe for the original installation or an update, the application files are installed properly and the custom action runs as expected. However, when I run the re-run the setup.exe, as expected, no files are laid down, but the custom action still runs. Since the database scripts files don't exist, the custom action fails.
I would like to skip the custom action when the setup.exe is re-run, but I can't figure out what condition to use. I want the CA to run during an install and an update, but not when the setup.exe is being re-run.
Is there a condition that would allow me to skip the CA in this case?
Thanks in advance for your assitance.
Dan
I have a single setup.exe that installs a windows application and lays down several database script files that are run using through a custom action which calls a custom MSBuild script.
When I run the setup.exe for the original installation or an update, the application files are installed properly and the custom action runs as expected. However, when I run the re-run the setup.exe, as expected, no files are laid down, but the custom action still runs. Since the database scripts files don't exist, the custom action fails.
I would like to skip the custom action when the setup.exe is re-run, but I can't figure out what condition to use. I want the CA to run during an install and an update, but not when the setup.exe is being re-run.
Is there a condition that would allow me to skip the CA in this case?
Thanks in advance for your assitance.
Dan
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 11, 2009
12:29 PM
To detect a first-time (MSI) installation, there's the condition Not Installed.
Depending on your update type, you can use the same condition that's on the SetupResume dialog to detect a minor upgrade, or use ISACTIONPROP1 (or whatever the "action property" in your major-upgrade item is) after FindRelatedProducts to detect a major upgrade.
Depending on your update type, you can use the same condition that's on the SetupResume dialog to detect a minor upgrade, or use ISACTIONPROP1 (or whatever the "action property" in your major-upgrade item is) after FindRelatedProducts to detect a major upgrade.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 24, 2010
04:19 PM
I have lived with this problem for months, but I am following up on the reply because the issue is becoming more problematic for us.
Robert, I have read the Installation and Uninstallation Conditions article you authored, but the conditions seem to miss the one condition that applies to my situation.
The Not Installed condition works great if I want to run the custom action only for first-time installations.
Let me add some details that may help explain the issue.
We develop several Windows applications that get built when a change is checked into source control, packaged (using InstallScript MSI), and bundled into a self-extracting ZIP file for deployment to test environments on a nightly basis.
On any given evening, only the applications that had changes are built, getting a new revision number (i.e. 2.1.1.####). The rest of the applications in the bundle remain the same as the previous night, yet are re-bundled with the changed applications and deployed.
To perform the deployment, we have a process that copies the self-extacting ZIP file to a test server and runs a generated script, which performs a silent install of each application in the bundle.
Here is the command we use to perform the silent install of an application:
"[ApplicationName]_Setup.exe" /s /V"/qn /l* \"[LogFilePath]""
Everything works as desired if the application being installed has an updated version number.
The issue occurs when the same version of an application is getting installed again. Windows Installer knows not to install any files, since the correct version of the files have already been installed. However, all of the custom actions execute. In this case, I don't want the custom actions to run.
But, I haven't been able to determine an installation condition that allows me to catch this condition. I only see conditions for Not Installed and Installed.
In a silent install, why would the custom actions execute, but the installation of files get skipped when determined that the version has already been installed? And how can I get the custom actions to not execute?
Thanks in advance,
Dan
Robert, I have read the Installation and Uninstallation Conditions article you authored, but the conditions seem to miss the one condition that applies to my situation.
The Not Installed condition works great if I want to run the custom action only for first-time installations.
Let me add some details that may help explain the issue.
We develop several Windows applications that get built when a change is checked into source control, packaged (using InstallScript MSI), and bundled into a self-extracting ZIP file for deployment to test environments on a nightly basis.
On any given evening, only the applications that had changes are built, getting a new revision number (i.e. 2.1.1.####). The rest of the applications in the bundle remain the same as the previous night, yet are re-bundled with the changed applications and deployed.
To perform the deployment, we have a process that copies the self-extacting ZIP file to a test server and runs a generated script, which performs a silent install of each application in the bundle.
Here is the command we use to perform the silent install of an application:
"[ApplicationName]_Setup.exe" /s /V"/qn /l* \"[LogFilePath]""
Everything works as desired if the application being installed has an updated version number.
The issue occurs when the same version of an application is getting installed again. Windows Installer knows not to install any files, since the correct version of the files have already been installed. However, all of the custom actions execute. In this case, I don't want the custom actions to run.
But, I haven't been able to determine an installation condition that allows me to catch this condition. I only see conditions for Not Installed and Installed.
In a silent install, why would the custom actions execute, but the installation of files get skipped when determined that the version has already been installed? And how can I get the custom actions to not execute?
Thanks in advance,
Dan
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 28, 2010
05:52 PM
Are the CA's in question created by your development team?
If yes, it may be best to add logic to your CA's that verifies if it is safe and/or necessary for the CA to execute...
Rick
If yes, it may be best to add logic to your CA's that verifies if it is safe and/or necessary for the CA to execute...
Rick