cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
boggle
Level 3

Website name and Content Source Path from property

Hi there

I have a client requirement to set the name of an installed website from the UI. The name should also correspond to the location of the site files.

e.g.
User enters "MySiteName" as the site name -> site content is installed to inetpub\wwwroot\MySiteName

I'm setting the value from the UI into a property SITE_NAME
I'm using this property in the InstallShield IIS web site UI, as [SITE_NAME] in the "Name" field. When I deploy the site, the site name DOES get set correctly.

However, the problem arises when I try to set the Content Source Path of the site. I try to set the location to be [IISROOTFOLDER][SITE_NAME], but instead of being installed to inetpub\wwwroot\MySiteName, it's actually installed to inetpub\wwwroot\[SITE_NAME]

It's resolving the IISROOTFOLDER, why not my SITE_NAME prop?
How do I get the property to be resolved in the Content Source Path field?

Is it even possible, or can it only be done through script using appcmd or something like that?

I'm using InstallShield 2011 Premier
Labels (1)
0 Kudos
(3) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The Content Source Path setting does not get resolved the same as other settings at runtime. The source path is assumed to be a Directory table key instead of being formatted as a substitution string. Therefore, to be able to set the content source path dynamically at runtime, a specific Directory table entry must be used where the content is expected to be.

If you are installing a folder at inetpub\wwwroot\[SITE_NAME] through Windows Installer (meaning this folder isn't being created by a custom action), then there will be a Directory entry that represents this path. Setting the Path property value in the ISIISProperty table in your project, or browsing for the folder in the IIS view will allow for setting a specific Directory key as the content path.
0 Kudos
hatem_darweesh
Level 2

I have the same problem, I wan't to create a web Application in IIS with a dynamic VirtualDirectory Name ?!
I tried to create an entry in the Directory table, but still it doesn't resolve it!!



joshstechnij wrote:
The Content Source Path setting does not get resolved the same as other settings at runtime. The source path is assumed to be a Directory table key instead of being formatted as a substitution string. Therefore, to be able to set the content source path dynamically at runtime, a specific Directory table entry must be used where the content is expected to be.

If you are installing a folder at inetpub\wwwroot\[SITE_NAME] through Windows Installer (meaning this folder isn't being created by a custom action), then there will be a Directory entry that represents this path. Setting the Path property value in the ISIISProperty table in your project, or browsing for the folder in the IIS view will allow for setting a specific Directory key as the content path.


Thanks.
0 Kudos

I have the same problem!

0 Kudos