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: How does FeatureSetTarget work?
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 22, 2009
04:21 AM
How does FeatureSetTarget work?
Hi,
My project is a InstallScript MSI Project.
Under Internet Information Services, I have created an Application Pool.
Under Identity for the Application Pool I have set Username to and Password to
Under the OnFirstUIBefore event, I have a dialog where I ask for a username and password, that the application pool shall run under.
After the username and password are specified I call:
FeatureSetTarget(MEDIA, "", wsUserAccount);
FeatureSetTarget(MEDIA, "", wsPassword);
But the text is not substituted when the application pool is installed :confused:
The features are all defined under Organization>features.
What am I doing wrong?
Thanx.
My project is a InstallScript MSI Project.
Under Internet Information Services, I have created an Application Pool.
Under Identity for the Application Pool I have set Username to
Under the OnFirstUIBefore event, I have a dialog where I ask for a username and password, that the application pool shall run under.
After the username and password are specified I call:
FeatureSetTarget(MEDIA, "
FeatureSetTarget(MEDIA, "
But the text is not substituted when the application pool is installed :confused:
The features are all defined under Organization>features.
What am I doing wrong?
Thanx.
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 22, 2009
07:28 AM
Have you tried the procedure in the following help topic?
Using Windows Installer Properties to Dynamically Modify IIS Settings
Using Windows Installer Properties to Dynamically Modify IIS Settings
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 27, 2009
09:21 AM
I have looked at MsiSetProperty, but it does not work.
Here is what I am doing.
I make a new application pool under Internet Information Services > Applicaton Pools.
Under Identity at choose Configurable and in User Name, I enter [MYIWUSER].
In the onFirstUIBefore event, I enter this code:
MsiSetProperty(ISMSI_HANDLE, "MYIWUSER", "MYTEST");
After running the installation the field User Name should contain MYTEST, but instaid it is empty.
What am I missing? some property settings?, include files?, set ISMSI_HANDLE to something?, something to do with IS_IIS_DO_NOT_USE_REG? :confused:
According to the Help topic this should be a simple task.
Here is what I am doing.
I make a new application pool under Internet Information Services > Applicaton Pools.
Under Identity at choose Configurable and in User Name, I enter [MYIWUSER].
In the onFirstUIBefore event, I enter this code:
MsiSetProperty(ISMSI_HANDLE, "MYIWUSER", "MYTEST");
After running the installation the field User Name should contain MYTEST, but instaid it is empty.
What am I missing? some property settings?, include files?, set ISMSI_HANDLE to something?, something to do with IS_IIS_DO_NOT_USE_REG? :confused:
According to the Help topic this should be a simple task.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 27, 2009
06:20 PM
Using MsiSetProperty would be the appropriate way to dynamically set the username/password identity information for application pools. If this is not working, more information is needed to troubleshoot the issue. For instance, is this issue occurring on some machine or all machines, what versions of IIS is this occurring with? Also, a verbose log of the installation should be created to determine if the property is being set and if it is being passed to the execute sequence.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 28, 2009
06:48 AM
The machines that I am testing on are Windows 2003 with IIS6 and
Windows 2008 with IIS7.
But I think I am closer to where the problem is. It has something to do with FeatureMoveData.
In our installation there is a program that we need to extract before the rest of the installation can continue. We use this program to test windows users and other stuff.
So in our onFirstUIBefore event the code is something like this:
If I put MsiSetProperty(ISMSI_HANDLE, "MYIWUSER", "MYTEST"); before the FeatureMoveData then it works - so calling MsiSetProperty after FeatureMoveData does not work even thou the application pools and websites do not belong to the feature that is moved when FeatureMoveData is called.
And it seems that calling FeatureMoveData("",nvDisk,0), which should reset internal structures (what ever that meens), has no affect.
How do I resolve this problem?:(
Windows 2008 with IIS7.
But I think I am closer to where the problem is. It has something to do with FeatureMoveData.
In our installation there is a program that we need to extract before the rest of the installation can continue. We use this program to test windows users and other stuff.
So in our onFirstUIBefore event the code is something like this:
//deselect all feature other then the one where our program is attached
FeatureSelectItem(MEDIA,"Webservice",FALSE);
FeatureSelectItem(MEDIA,"Webportal",FALSE);
FeatureSelectItem(MEDIA,"Installdatabase",FALSE);
//move our program to disk
FeatureMoveData(MEDIA,nvDisk,0);
//reset internal structures
FeatureMoveData("",nvDisk,0);
//select all features and ask the user what features he whants to install
FeatureSelectItem(MEDIA,"Webservice",TRUE);
FeatureSelectItem(MEDIA,"Webportal",TRUE);
FeatureSelectItem(MEDIA,"Installdatabase",TRUE);
Dlg_SdFeatureTree:
szTitle = "";
szMsg = "";
if (nSetupType = CUSTOM) then
nResult = SdFeatureTree(szTitle, szMsg, INSTALLDIR, "", 2);
if (nResult = BACK) goto Dlg_SdAskDestPath;
endif;
....
....
//then some code with dialogs and checks where we use our program
....
....
//and finally calls with MsiSetProperty that do not work
MsiSetProperty(ISMSI_HANDLE, "MYIWUSER", "MYTEST");
If I put MsiSetProperty(ISMSI_HANDLE, "MYIWUSER", "MYTEST"); before the FeatureMoveData then it works - so calling MsiSetProperty after FeatureMoveData does not work even thou the application pools and websites do not belong to the feature that is moved when FeatureMoveData is called.
And it seems that calling FeatureMoveData("",nvDisk,0), which should reset internal structures (what ever that meens), has no affect.
How do I resolve this problem?:(
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 28, 2009
11:07 AM
FeatureMoveData in an InstallScript MSI project does not work the same as it would normally in a pure InstallScript project. For InstallScript MSI, if this function is called, this will result in the InstallScript engine launching the MSI portion of the installation (this is normally done automatically after OnFirstUIBefore is finished). There is no "reset" functionality with this function in an InstallScript MSI project since InstallScript does not handle the file transfer.
Since FeatureMoveData is called before calling MsiSetProperty in your script, the property used by the IIS custom actions in the MSI part of the installation is not set yet, and therefore the app pool installs with a blank username.
In general, FeatureMoveData should should only be used in InstallScript projects (note that the help topic for FeatureMoveData applies to InstallScript projects only). As mentioned above, the MSI part of the installation will start after OnFirstUIBefore has completed. If a program needs to be run during the installation, it should normally be included as a support file that can be launched from SUPPORTDIR.
Since FeatureMoveData is called before calling MsiSetProperty in your script, the property used by the IIS custom actions in the MSI part of the installation is not set yet, and therefore the app pool installs with a blank username.
In general, FeatureMoveData should should only be used in InstallScript projects (note that the help topic for FeatureMoveData applies to InstallScript projects only). As mentioned above, the MSI part of the installation will start after OnFirstUIBefore has completed. If a program needs to be run during the installation, it should normally be included as a support file that can be launched from SUPPORTDIR.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 28, 2009
01:07 PM
I moved the program files that I used during the installation to Behavior and Logic > Support Files/Billboards and use SUPPORTDIR as the path to the files in my script.
I then removed the FeatureMoveData code - and everthing works perfect.
A thousand thanks!!! 😛
NB. I did not know about Support Files feature.:o
I then removed the FeatureMoveData code - and everthing works perfect.
A thousand thanks!!! 😛
NB. I did not know about Support Files feature.:o
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)