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

Virtual Directory Name

Is there any way to dynamically set a Virtual Directory name based on user input?

Update:

Solved this by making the string "[PropertyName]" and updating that property at run time.
Labels (1)
0 Kudos
(16) Replies
bruno_pt-br
Level 3

Hello costas0811

try what you want with a vbscript
http://techtasks.com/code/viewbookcode/1152
i think that this link can help you...

hugs
0 Kudos
bruno_pt-br
Level 3

Hello costas0811

try what you want with a vbscript
_http://techtasks.com/code/viewbookcode/1152_
i think that this link can help you with an ideia...

hugs
0 Kudos
costas0811
Level 3

bruno_pt-br wrote:
Hello costas0811

try what you want with a vbscript
_http://techtasks.com/code/viewbookcode/1152_
i think that this link can help you with an ideia...

hugs


Ummm..thanks for the hug but I was able to solve this without code.
0 Kudos
ChandanOmkar
Level 8

CAn you please explain that how you achieved this?
0 Kudos
DebbieL
Level 17

The help has instructions on how to dynamically configure various IIS settings using Windows Installer properties (in Basic MSI and InstallScript MSI projects) or text subs (in InstallScript projects):
Using Windows Installer Properties to Dynamically Modify IIS Settings
Using InstallScript Text Substitution to Dynamically Modify IIS Settings
Those instructions are applicable to the names of virtual directories.
0 Kudos
costas0811
Level 3

Yea...

I created a Web Application under Websites in the IIS Configuration Tab

Then I set the value of the "Name" property to [VDIRNAME] with the brackets.

I created a property called VDIRNAME and then within a dialog I set and Edit Box control to this property.

This works. When I run the install and change the value of the edit box, this is reflected when the vdir is created.
0 Kudos
palanisamy
Level 7

Hi costas0811

please confirm during the uninstalltion virtual directory is deleted, i face issue in Installshield 12 dynamic virtual directory are not deleted.
0 Kudos
costas0811
Level 3

Yea I just confirmed, the virtual directory is deleted on uninstall.
0 Kudos
DavidL
Level 3

I have an installar with 32-bit and 64-bit component web sites. Since "Default Web Site" wouldn't let me have 2 of the same Virtual Directories, I gave one of them a name of [MYPROPERTY] that is defined at compile time and is never changed.

I get the same behavior. I can create the virtual directory fine, however the virtual director remains behind on uninstall.

All the log entries for the MSI point to various .tmp files where the IIS stuff is going on.

Any ideas?
0 Kudos
costas0811
Level 3

DavidL wrote:
I have an installar with 32-bit and 64-bit component web sites. Since "Default Web Site" wouldn't let me have 2 of the same Virtual Directories, I gave one of them a name of [MYPROPERTY] that is defined at compile time and is never changed.

I get the same behavior. I can create the virtual directory fine, however the virtual director remains behind on uninstall.

All the log entries for the MSI point to various .tmp files where the IIS stuff is going on.

Any ideas?


Are you using InstallShield 2010? I do nothing special to delete any web components it "just worked" for me.
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

If a virtual directory using a property as the name is not being uninstalled, the cause is typically because the property that was set at install time to the name desired for the virtual directory is not set or not set to the same value at uninstall time. A log can usually be used to determine what the value of the property is.
0 Kudos
costas0811
Level 3

That may or may not be the case. The value which I gathered only during the Install sequence. That being said it may store the value somewhere else.

My assumption was that InstallShield began keeping track, as it does with files and folders etc, of changes to IIS.

I'd be more than happy to share a sample project if anyone wants to see this.
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

Neither InstallShield nor Windows Installer will maintain a property value set during installation for use in subsequence maintenance operations. The property value would need to be stored somewhere (possibly in a registry value) and read back with a system search or custom action to ensure the property is set for all maintenance operations.
0 Kudos
costas0811
Level 3

joshstechnij wrote:
Neither InstallShield nor Windows Installer will maintain a property value set during installation for use in subsequence maintenance operations. The property value would need to be stored somewhere (possibly in a registry value) and read back with a system search or custom action to ensure the property is set for all maintenance operations.


Negative. Properties are stored under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield Uninstall Information\{PRODUCT CODE}

See Attached Image

Also confirmed that if you remove the string value for the vdir, the product will not uninstall mentioned vdir "MSBOB".
0 Kudos
DebbieL
Level 17

Beginning with InstallShield 2008, Basic MSI and InstallScript MSI installations that install IIS Web sites and use Windows Installer properties to dynamically set IIS data at run time write the property and its value to the registry, as costas0811 noted. That change was made to make the value available during uninstallation and repair. This functionality was not available in InstallShield 12.

(If you do not want the IIS data to be stored in the registry, you would set the IS_IIS_DO_NOT_USE_REG property in your project.)
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

If this item is not being uninstalled, please create a verbose log of the uninstall process and attach it to this thread. Assuming the feature/component containing this item is being removed by Windows Installer, the log should provide additional information as to what the IIS custom actions are doing.
0 Kudos