Property change from the UI disappears from uninstall log.
If I install my app with default property values and then run uninstall the property appears in the uninstall log.
If I change the property value from the UI on uninstall it does not appear in the log.
This is the reason why the apppool and webapp remain in IIS after uninstall, which is not the case with the default values.
<Property Id="WEB_APP_NAME" Value="WebApp" Secure="yes" />
this is how to property looks like.
This is where I add it a value from the UI control
<Control Id="PoolNameEdit"
Type="Edit"
X="100"
Y="45"
Width="160"
Height="17"
Property="WEB_APP_NAME"
Text="{80}"
Indirect="no" />
And this is how I use it
<!-- Define the directory structure -->
<Fragment>
<!--Directory elemens hierarchy always starts with Id="TARGETDIR" Name="SourceDir"-->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WEB_APP_FOLDER_LOC" Name="WebInstaller">
<Directory Id="WEBFOLDER" Name ="[WEB_APP_NAME]" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<!--Concatenate user input for folderpath-->
<SetDirectory Id="WEBFOLDER"
Value="[WEB_APP_FOLDER_LOC][WEB_APP_NAME]"
Sequence="both" />
<!--Create new folder-->
<DirectoryRef Id="WEBFOLDER">
<Component Id="cmp_WebDir"
Guid="{E0CE5051-1419-4997-949F-020BC814ECDA}"
KeyPath="yes">
<CreateFolder />
</Component>
</DirectoryRef>
<!--Components-->
<ComponentGroup Id="ProductComponents" Directory="WEBFOLDER">
<!--Client config-->
<Component Id="cmpWebConfig"
Guid="{1C84DF1F-2EA4-46E6-8125-C6FD410AFED9}"
KeyPath="yes">
<Condition>INCLUDECONFIGFILE="1"</Condition>
<File Source="Configuration\Web.config" />
</Component>
<!--Application pool-->
<Component Id="cmpAppPool"
Guid="{00D6ABB1-734F-4788-ADB8-12A30056C513}"
KeyPath="yes">
<iis:WebAppPool Id="MyAppPool"
Name="[WEB_APP_NAME]"
ManagedRuntimeVersion="v4.0"
ManagedPipelineMode="integrated"
Identity="applicationPoolIdentity" />
</Component>
<!--Website-->
<Component Id="cmpMyWebsite"
Guid="{ECD42015-C067-44F3-94D9-5E713BCB586D}"
KeyPath="yes">
<iis:WebSite Id="website_MyWebsite"
Description="[WEB_APP_NAME]"
Directory="WEBFOLDER"
ConfigureIfExists="no">
<iis:WebApplication Id="webapplication_MyWebsite"
Name="[WEB_APP_NAME]"
WebAppPool="MyAppPool" />
<iis:WebAddress Id="webaddress_MyWebsite"
Port="[WEB_APP_PORT]" />
</iis:WebSite>
</Component>
I would have expected after the change of WEB_APP_NAME in the UI, the uninstaller to be able to find it and thus remove appool and webapp from IIS.
Property(S): VirtualMemory = 3353
Property(S): UpgradeCode = {A4F9CA9E-4135-4D6F-AF58-FADA49E265DA}
Property(S): ConfigureIIs7Exec = **********
Property(S): StartIIS7ConfigTransaction = **********
Property(S): RollbackIIS7ConfigTransaction = **********
Property(S): CommitIIS7ConfigTransaction = **********
Property(S): WriteIIS7ConfigChanges = **********
Property(S): NETFRAMEWORK45 = #461808
Property(S): WEBFOLDER= C:\inetpub\WebApp\
Property(S): WEB_APP_FOLDER_LOC = C:\inetpub\
Property(S): WEB_APP_NAME = WebApp
Property(S): WEB_APP_PORT = 8080
Property(S): WEB_APP_USERNAME = ******
Property(S): WEB_APP_DOMAIN_NAME = ******
Property(S): WEB_APP_SQLSERVER_NAME = ******
Property(S): INCLUDECONFIGFILE = 1
this is how the default uninstall log looks like, if I change WEB_APP_NAME to something else, WEB_APP_NAME is not found on the uninstall log where it can be seen above?
Appreciate any ideas that would resolve this!