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: custom actions conditions, how to define and use it?
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
Dec 08, 2008
06:08 PM
custom actions conditions, how to define and use it?
Hi.
I would like to execute some sequence of custom actions (mostly managed code functions, and few command line executions), but it must depend on returned results from executed functions from previous steps. Also, it should be executed only if some feature is selected in setup type (for example named DBFeature).
For example, some sequence similar as pseudo code:
bool IsInstalled = true;
bool InstallStarted = false;
uint InstallFinished = false;
if (DBFeatureSelected) then
IsInstalled = MyClass.IsSqlInstanceInstalled("MySQLInstanceName");
if (DBFeatureSelected)
{
if (!IsInstalled)
InstallStarted = ExecuteSomeExeFile(EXEFileName, commandParams);
else
ShowMessage("SQL Instance already installed...");
}
if (DBFeatureSelected && !IsInstalled)
{
if (InstallStarted)
InstallFinished = MyClass.DetectSqlInstallationFinished("MySQLInstanceName", 3000);
else
ShowMessage("Error in starting SQL Instance installation...");
}
if (DBFeatureSelected && !IsInstalled && InstallStarted)
{
if (InstallFinished)
DBAdded = MyClass.AddDB("MySQLInstanceName", "MyDBName");
else
ShowMessage("SQL Instance installation timeout...");
}
...
I think it is enough to get the picture... So my questions can be defined as:
1. Where in documentation I can found some decent explanation how to use conditions in setup? I have tried to find it IS user guide.pdf but didn't succeed...
2. How to detect in conditions that some feature is selected (for example feature named DBFeature)?
3. How to define some global variables and get result of managed code function into it? How I can use this variables later in other conditions?
4. In custom action properties there is some UICondition and similar properties, but it is unclear to me how to use this to define some conditions that can be used to resolve sequence that I gave as example.
5. Is there some limitation in project types that must be chosen to enable similar use of custom actions? (this should be only small part of setup that should also involve installation of win service module and few client applications...)
As you can see, I have lot of questions and I would appreciate any help here. But please do not give me some general hints and links to tons of pages of documentation, at least give me some hints where exactly to look for. I would prefer some simple examples if it is possible.
Best regards.
I would like to execute some sequence of custom actions (mostly managed code functions, and few command line executions), but it must depend on returned results from executed functions from previous steps. Also, it should be executed only if some feature is selected in setup type (for example named DBFeature).
For example, some sequence similar as pseudo code:
bool IsInstalled = true;
bool InstallStarted = false;
uint InstallFinished = false;
if (DBFeatureSelected) then
IsInstalled = MyClass.IsSqlInstanceInstalled("MySQLInstanceName");
if (DBFeatureSelected)
{
if (!IsInstalled)
InstallStarted = ExecuteSomeExeFile(EXEFileName, commandParams);
else
ShowMessage("SQL Instance already installed...");
}
if (DBFeatureSelected && !IsInstalled)
{
if (InstallStarted)
InstallFinished = MyClass.DetectSqlInstallationFinished("MySQLInstanceName", 3000);
else
ShowMessage("Error in starting SQL Instance installation...");
}
if (DBFeatureSelected && !IsInstalled && InstallStarted)
{
if (InstallFinished)
DBAdded = MyClass.AddDB("MySQLInstanceName", "MyDBName");
else
ShowMessage("SQL Instance installation timeout...");
}
...
I think it is enough to get the picture... So my questions can be defined as:
1. Where in documentation I can found some decent explanation how to use conditions in setup? I have tried to find it IS user guide.pdf but didn't succeed...
2. How to detect in conditions that some feature is selected (for example feature named DBFeature)?
3. How to define some global variables and get result of managed code function into it? How I can use this variables later in other conditions?
4. In custom action properties there is some UICondition and similar properties, but it is unclear to me how to use this to define some conditions that can be used to resolve sequence that I gave as example.
5. Is there some limitation in project types that must be chosen to enable similar use of custom actions? (this should be only small part of setup that should also involve installation of win service module and few client applications...)
As you can see, I have lot of questions and I would appreciate any help here. But please do not give me some general hints and links to tons of pages of documentation, at least give me some hints where exactly to look for. I would prefer some simple examples if it is possible.
Best regards.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 11, 2008
06:05 PM
For a start, you might look at the MSI help topic "Conditional Statement Syntax", and also the examples it links to.
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)