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
- :
- At least part of the answer
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
‎Aug 31, 2012
09:22 AM
Assigning Custom Actions to SetupTypes
I have just started to use Installsield 2011 Professional to build an installation of our product since last week. I have previously used Microsoft Visual Studio's built in tool but have not used Installshield itself.
Our product can be installed in two configurations. One configuration installs all the application executables and two databases plus other data files on a single target platform. The other configuration is more of a tiered structure with different executables installed on several servers within a local network. For example, the databases and several executables are installed on a Database Server platform, and the end user executables are installed on a User platform. We actually have as many as a dozen or more servers with six different server setup installations. We do not want the different server to have the entire project installed if they do not need it for their purpose(we do not want to create the databases on servers that do not serve the database).We do not use web based applications or need to install over the internet at this point (we actually are prohibited from connecting to the internet).
To build the installer, I am trying to create one Installshield InstallScript MSI project which will have SetupType defined for each type of server plus a SetupType for the Standalone installation. I am not sure if this is a feasible design to handle this type of installation or if I will need to build separate installers for each type of server.
My major problem at this point is in defining shortcuts and custom actions that only apply to one particular SetupType. I can not find anyway to set the SetupType or Feature that a shortcut or custom action should be limited to. For example, I have several custom actions to configure SQL Server and build one of the databases. My custom actions are built as execuable console applications that could be used seaparately from the installer. I would like these custom actions to only be executed during the "Install" and not the "RollBack" or "Uninstall" processes. When I add the custon actions to the InstallScript Msi project, they are executing for every setup type and for the "Install" and "Uninstall" phase of the installer.
My questions are:
How do I limit the custom actions to execute only during "Install"?
How do I specify which "SetupTypes" a custom action should be run on?
How do you build Shortcuts that only get created for certain SetupTypes?
Do I have to build special "installer" friendly executables in order to use them as custom actions?
One other related question. I have changed the InstallScript to use the SdSetupTypeEx dialog instead of the SdSetupType dialog which is the default. It defines a string "svSetupType" variable in OnFirstUIBefore function. How and where do I use the selected svSetupType to control which files are moved during the installation? Is there any sample code that shows how to use the SdSetupTypeEx?
I appreciate any help that anyone can give me as "newbie" to Installshield.
Thanks for your help in advance.
Richard
Our product can be installed in two configurations. One configuration installs all the application executables and two databases plus other data files on a single target platform. The other configuration is more of a tiered structure with different executables installed on several servers within a local network. For example, the databases and several executables are installed on a Database Server platform, and the end user executables are installed on a User platform. We actually have as many as a dozen or more servers with six different server setup installations. We do not want the different server to have the entire project installed if they do not need it for their purpose(we do not want to create the databases on servers that do not serve the database).We do not use web based applications or need to install over the internet at this point (we actually are prohibited from connecting to the internet).
To build the installer, I am trying to create one Installshield InstallScript MSI project which will have SetupType defined for each type of server plus a SetupType for the Standalone installation. I am not sure if this is a feasible design to handle this type of installation or if I will need to build separate installers for each type of server.
My major problem at this point is in defining shortcuts and custom actions that only apply to one particular SetupType. I can not find anyway to set the SetupType or Feature that a shortcut or custom action should be limited to. For example, I have several custom actions to configure SQL Server and build one of the databases. My custom actions are built as execuable console applications that could be used seaparately from the installer. I would like these custom actions to only be executed during the "Install" and not the "RollBack" or "Uninstall" processes. When I add the custon actions to the InstallScript Msi project, they are executing for every setup type and for the "Install" and "Uninstall" phase of the installer.
My questions are:
How do I limit the custom actions to execute only during "Install"?
How do I specify which "SetupTypes" a custom action should be run on?
How do you build Shortcuts that only get created for certain SetupTypes?
Do I have to build special "installer" friendly executables in order to use them as custom actions?
One other related question. I have changed the InstallScript to use the SdSetupTypeEx dialog instead of the SdSetupType dialog which is the default. It defines a string "svSetupType" variable in OnFirstUIBefore function. How and where do I use the selected svSetupType to control which files are moved during the installation? Is there any sample code that shows how to use the SdSetupTypeEx?
I appreciate any help that anyone can give me as "newbie" to Installshield.
Thanks for your help in advance.
Richard
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 31, 2012
02:36 PM
I am been digging a bit to try to figure out how to get the custom actions to run on specific SetupTypes and I think the solution might be in defining a condition for the custom action. I don't know how to identify the Component (executable that is the custom action) in order to build a condition.
This is what I done so far. I have an executable "runSometihing.exe" which I have added as a component file to be installed in some "runFeature" which will be included in the "runServer" SetupType. This component is not included in the other "server" setupTypes. Now, I added the Custom Action to the Custom Action View to run the "runSomething.exe" an defined it to run during the Install Exec sequence. But what to I put in the condition for the Install Exec sequence to test if the component is included (installed)? How do identify this component in the condition?
I may not be on the right track yet but if I am can anyone give me some hints on the condition builder to tell if my component has been installed.
Thanks for the help.
Richard
This is what I done so far. I have an executable "runSometihing.exe" which I have added as a component file to be installed in some "runFeature" which will be included in the "runServer" SetupType. This component is not included in the other "server" setupTypes. Now, I added the Custom Action to the Custom Action View to run the "runSomething.exe" an defined it to run during the Install Exec sequence. But what to I put in the condition for the Install Exec sequence to test if the component is included (installed)? How do identify this component in the condition?
I may not be on the right track yet but if I am can anyone give me some hints on the condition builder to tell if my component has been installed.
Thanks for the help.
Richard
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 04, 2012
11:58 AM
After a lot of digging, I believe I have figured out how to write the Install Exec condition. I found the reference below is another post.
To successfully run a custom action that is run from an installed file, you must ensure that the file is installed locally using a conditional statement:
If the custom action is sequenced before RemoveFiles—Run the action only if the component was installed locally.
(?ComponentName=3)
If the custom action is sequenced between RemoveFiles and InstallFiles—Run the action only if the component was installed locally. Do not run the action on an uninstallaton.
(?ComponentName=3) AND NOT($ComponentName=2)
If the custom action is sequenced after InstallFiles—Run the action only if the component will be installed locally.
($ComponentName=3)
The ComponentName is the component where is associated with the source file.
From this I was able to define a condition for my Custom Action which runs an application like "myexecutable.exe. The condition is simply:
($myexecutable.exe=3)
So far it seems to be working such that the custom action is only executed when the condition is met that the executable was installed locally.
Hope this helps other newbies like myself. I guess it should be fairly obvious thath this is the way it works but then most of the time after you find a solution, the solution does look obvious.
Thanks
Richard
To successfully run a custom action that is run from an installed file, you must ensure that the file is installed locally using a conditional statement:
If the custom action is sequenced before RemoveFiles—Run the action only if the component was installed locally.
(?ComponentName=3)
If the custom action is sequenced between RemoveFiles and InstallFiles—Run the action only if the component was installed locally. Do not run the action on an uninstallaton.
(?ComponentName=3) AND NOT($ComponentName=2)
If the custom action is sequenced after InstallFiles—Run the action only if the component will be installed locally.
($ComponentName=3)
The ComponentName is the component where is associated with the source file.
From this I was able to define a condition for my Custom Action which runs an application like "myexecutable.exe. The condition is simply:
($myexecutable.exe=3)
So far it seems to be working such that the custom action is only executed when the condition is met that the executable was installed locally.
Hope this helps other newbies like myself. I guess it should be fairly obvious thath this is the way it works but then most of the time after you find a solution, the solution does look obvious.
Thanks
Richard
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)