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
- :
- Suite Actions Can't Access System Properties
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
‎Apr 28, 2015
02:48 PM
Suite Actions Can't Access System Properties
Hello,
When I try to access properties like "FEATURE[FeatureName].actionState" in suite actions(i.e. Set Property action in Events view or managed code) they are always null. However they work fine when I write the same thing from the UI. How can I access this features from suite actions? I need them in my managed code.
Thank you,
Marek
When I try to access properties like "FEATURE[FeatureName].actionState" in suite actions(i.e. Set Property action in Events view or managed code) they are always null. However they work fine when I write the same thing from the UI. How can I access this features from suite actions? I need them in my managed code.
Thank you,
Marek
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 14, 2015
04:09 AM
Anyone knows how to acces properties like "FEATURE[FeatureName].actionState" from the suite actions? It is just not working for me and I have to use the old C++ CustomActions that I wanted to get rid off.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 14, 2015
07:48 AM
Have you added a reference to the library file in your code? That is the only thing that I can think of.
For our C++ custom action I had to #import\SetupSuite.exe
Ooops, my bad. I just realized that you are working with managed code and wanted to eliminate the C++ code.
http://helpnet.flexerasoftware.com/installshield21helplib/helplibrary/SteActionManagedCd.htm
I have not used the managed code only InstallScript and C++. Sorry. The above documents the process though. Unfortunately the documentation seems to indicate that objects for feature state are not exposed.
For our C++ custom action I had to #import
#import "..\..\..\Redist\Language Independent\i386\SetupSuite.exe" no_namespace raw_interfaces_only named_guids
...
HRESULT __stdcall MyCustomAction(IDispatch *pAction);
{
BSTR upgradeCode = ::SysAllocStringLen(NULL, 2*iGUID);
BSTR bstrUpgradeCode(_T("UPGRADE_PROPERTY"));
// Create a smart pointer to the IsSuiteExtension COM interface
CComQIPtrspSuiteExtension = pAction;
CComQIPtrspSuiteExtension2 = pAction;
try
{
hRet = SpSuiteExtention->get_Property(bstrUpgradeCode, &upgradeCode);
}...
}
Ooops, my bad. I just realized that you are working with managed code and wanted to eliminate the C++ code.
http://helpnet.flexerasoftware.com/installshield21helplib/helplibrary/SteActionManagedCd.htm
I have not used the managed code only InstallScript and C++. Sorry. The above documents the process though. Unfortunately the documentation seems to indicate that objects for feature state are not exposed.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 14, 2015
09:20 AM
Thank you for the suggestion. The feature state properties are not working in all suite actions. I've tried to create simple SetProperty Action in the UI and the result was the same. I wonder why is that. In the C++ custom actions that were introduced in IS 2012 it is working correctly.
DLee65 wrote:
Have you added a reference to the library file in your code? That is the only thing that I can think of.
For our C++ custom action I had to #import\SetupSuite.exe
#import "..\..\..\Redist\Language Independent\i386\SetupSuite.exe" no_namespace raw_interfaces_only named_guids
...
HRESULT __stdcall MyCustomAction(IDispatch *pAction);
{
BSTR upgradeCode = ::SysAllocStringLen(NULL, 2*iGUID);
BSTR bstrUpgradeCode(_T("UPGRADE_PROPERTY"));
// Create a smart pointer to the IsSuiteExtension COM interface
CComQIPtrspSuiteExtension = pAction;
CComQIPtrspSuiteExtension2 = pAction;
try
{
hRet = SpSuiteExtention->get_Property(bstrUpgradeCode, &upgradeCode);
}...
}
Ooops, my bad. I just realized that you are working with managed code and wanted to eliminate the C++ code.
http://helpnet.flexerasoftware.com/installshield21helplib/helplibrary/SteActionManagedCd.htm
I have not used the managed code only InstallScript and C++. Sorry. The above documents the process though. Unfortunately the documentation seems to indicate that objects for feature state are not exposed.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 28, 2015
12:54 PM
Feature "properties" are not suite engine based properties. They are implemented by the UI DLL in suite projects, and as such, are generally only available through the suite UI. Unfortunately, attempting to access these through ISuiteExtension::get_Property (in InstallScript, DLL, or Managed actions) or any other place outside of the UI (such as in a UI DLL action) won't work.
The next release of InstallShield does provide a way to get information from certain suite objects, such as features, through new functionality that would allow something like using a set property action to set a property to the value of a feature's action state.
The next release of InstallShield does provide a way to get information from certain suite objects, such as features, through new functionality that would allow something like using a set property action to set a property to the value of a feature's action state.