How to add a TFS group to a ProcessTemplate - tfs-process-template

I have a TFS group (not an active directory group) that I need to add to every project we create in TFS. I open the XML file and add the group but when I create the project there is no one in it. If I check TFS they are in the group but not the group TFS added.
<group name="Business Analysts" description="All our BA's">
<permissions>
<permission name="GENERIC_READ" class="PROJECT" allow="true" />
<permission name="GENERIC_WRITE" class="PROJECT" allow="true" />
<permission name="DELETE" class="PROJECT" allow="false" />
<permission name="PUBLISH_TEST_RESULTS" class="PROJECT" allow="false" />
<permission name="DELETE_TEST_RESULTS" class="PROJECT" allow="false" />
<permission name="ADMINISTER_BUILD" class="PROJECT" allow="false" />
<permission name="START_BUILD" class="PROJECT" allow="false" />
<permission name="EDIT_BUILD_STATUS" class="PROJECT" allow="false" />
<permission name="UPDATE_BUILD" class="PROJECT" allow="false" />
<permission name="CREATE_CHILDREN" class="CSS_NODE" allow="true" />
<permission name="WORK_ITEM_READ" class="CSS_NODE" allow="true" />
<permission name="WORK_ITEM_WRITE" class="CSS_NODE" allow="true" />
<permission name="MANAGE_TEST_PLANS" class="CSS_NODE" allow="false" />
<permission name="VIEW_TEST_RESULTS" class="PROJECT" allow="false" />
<permission name="MANAGE_TEST_ENVIRONMENTS" class="PROJECT" allow="false" />
<permission name="MANAGE_TEST_CONFIGURATIONS" class="PROJECT" allow="false" />
<permission name="CREATE_CHILDREN" class="ITERATION_NODE" allow="true" />
<permission name="DELETE" class="CSS_NODE" allow="true" />
<permission name="DELETE" class="ITERATION_NODE" allow="true" />
<permission name="GENERIC_READ" class="CSS_NODE" allow="true" />
<permission name="GENERIC_READ" class="ITERATION_NODE" allow="true" />
<permission name="GENERIC_WRITE" class="CSS_NODE" allow="true" />
<permission name="GENERIC_WRITE" class="ITERATION_NODE" allow="true" />
</permissions>
<members>
<member name="[DefaultCollection]\Business Analysts"></member>
</members>
</group>

It depends on where Business Analysts exists.
TFS Groups exist at the server level, at the collection level, and at the project level. source
For instance, you might try:
member name="[SERVER]\Business Analysts"
This references the TFS Server as the "domain" instead of DefaultCollection.

Related

CCC for SAP B1 : While synchronizing addon, Error : Parse ard file failed

I have created light weight addon using Addon extension package.
And synchronizing addon.zip file on Cloud Control Center for SAP Business one extensions registry, while synchronizing addon it shows the error "Parse ard file failed".
I have question that "how to put successful addon for Cloud Control Center for SAP Business one extensions registry?"
** ARD File on Addon.zip**
<?xml version="1.0" encoding="utf-8"?>
<AddOnRegData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SlientInstallation="No" SlientUpgrade="No" Partnernmsp="VedhaSoft" SchemaVersion="3.0" Type="" MultipleVersion="false" OnDemand="" OnPremise="" ExtName="xxxxxx_210721_3" ExtVersion="21.7.21.3" Contdata="xxxxxx" Partner="xxxxxx" DBType="HANA" ClientType="W">
<Validity>
<SBOCompatibility>
<Version From="" To="" />
</SBOCompatibility>
</Validity>
<Configuration>
<Repository>
<Properties />
</Repository>
<Deployment>
<Properties />
</Deployment>
<Assignment>
<Properties />
</Assignment>
</Configuration>
<Addons>
<Addon Name="xxxxxx_210721_3" Group="" ForceFlag="" Visible="" AutoAssign="" SelfUpgrd="">
<x86 AddonExe="" AddonSig="">
<Installation>
<Files />
</Installation>
<Uninstallation>
<Files />
</Uninstallation>
</x86>
<x64 AddonExe="QualityControl.exe" AddonSig="9D672BBF4C062056E404E07F8D770146" ExeDir="X64Client">
<Installation>
<Files>
<File FileName="X64Client\Interop.SAPbobsCOM.dll">
<Actions />
</File>
<File FileName="X64Client\Interop.SAPbouiCOM.dll">
<Actions />
</File>
<File FileName="X64Client\QualityControl.b1s">
<Actions />
</File>
<File FileName="X64Client\QualityControl.exe">
<Actions />
</File>
<File FileName="X64Client\QualityControl.exe.config">
<Actions />
</File>
<File FileName="X64Client\QualityControl.pdb">
<Actions />
</File>
<File FileName="X64Client\QualityControl.vshost.exe">
<Actions />
</File>
<File FileName="X64Client\QualityControl.vshost.exe.config">
<Actions />
</File>
<File FileName="X64Client\QualityControl.xml">
<Actions />
</File>
<File FileName="X64Client\Sap.Data.Hana.v4.5.dll">
<Actions />
</File>
<File FileName="X64Client\SAPBusinessOneSDK.dll">
<Actions />
</File>
<File FileName="X64Client\XML\CFL_GRN_Inspection.xml">
<Actions />
</File>
<File FileName="X64Client\XML\GeneralSetting.xml">
<Actions />
</File>
<File FileName="X64Client\XML\Inspection.xml">
<Actions />
</File>
<File FileName="X64Client\XML\Menu.xml">
<Actions />
</File>
<File FileName="X64Client\XML\MenuRemove.xml">
<Actions />
</File>
<File FileName="X64Client\XML\QC1.bmp">
<Actions />
</File>
<File FileName="X64Client\XML\QC101.BMP">
<Actions />
</File>
<File FileName="X64Client\XML\Service.bmp">
<Actions />
</File>
<File FileName="X64Client\XML\wrench.bmp">
<Actions />
</File>
</Files>
</Installation>
<Uninstallation>
<Files>
<File FileName="X64Client\Interop.SAPbobsCOM.dll">
<Actions />
</File>
<File FileName="X64Client\Interop.SAPbouiCOM.dll">
<Actions />
</File>
<File FileName="X64Client\QualityControl.b1s">
<Actions />
</File>
<File FileName="X64Client\QualityControl.exe">
<Actions />
</File>
<File FileName="X64Client\QualityControl.exe.config">
<Actions />
</File>
<File FileName="X64Client\QualityControl.pdb">
<Actions />
</File>
<File FileName="X64Client\QualityControl.vshost.exe">
<Actions />
</File>
<File FileName="X64Client\QualityControl.vshost.exe.config">
<Actions />
</File>
<File FileName="X64Client\QualityControl.xml">
<Actions />
</File>
<File FileName="X64Client\Sap.Data.Hana.v4.5.dll">
<Actions />
</File>
<File FileName="X64Client\SAPBusinessOneSDK.dll">
<Actions />
</File>
<File FileName="X64Client\XML\CFL_GRN_Inspection.xml">
<Actions />
</File>
<File FileName="X64Client\XML\GeneralSetting.xml">
<Actions />
</File>
<File FileName="X64Client\XML\Inspection.xml">
<Actions />
</File>
<File FileName="X64Client\XML\Menu.xml">
<Actions />
</File>
<File FileName="X64Client\XML\MenuRemove.xml">
<Actions />
</File>
<File FileName="X64Client\XML\QC1.bmp">
<Actions />
</File>
<File FileName="X64Client\XML\QC101.BMP">
<Actions />
</File>
<File FileName="X64Client\XML\Service.bmp">
<Actions />
</File>
<File FileName="X64Client\XML\wrench.bmp">
<Actions />
</File>
</Files>
</Uninstallation>
</x64>
</Addon>
</Addons>
<XApps>
<XApp Name="" Path="" FileName="" />
</XApps>
<UDQs>
<UDQ udqname="">
<Hana FileName="" />
</UDQ>
</UDQs>
</AddOnRegData>
<!-- end snippet -->
Fill up the version in the From and To attributes of the section
<SBOCompatibility>
<Version From="" To="" />
</SBOCompatibility>

How to uninstall a service completely from an application in the next upgrade which isn't a major upgrade

I am trying to uninstall an installed service that has several components but not able to.
Could anyone please help me with the uninstalling tags too? I did a lot of searches but couldn't run anything successfully.
Just putting ServiceControl tag and removing all the components work? I tried that but didn't work. How do you deal with components and dependencies? Need logic and syntax help.
Below is my code that installs the service in the previous version. Please let me know of the tags that I have to add to remove this.
<Directory Id="dirxxx" Name="oldname">
<!-- oldname service-->
<Component Id="cmpOldNameService" Guid="bbb"
SharedDllRefCount="no" KeyPath="no" NeverOverwrite="no" Permanent="no" Transitive="no"
Win64="no" Location="either">
<RemoveFile Id="ccc" On="uninstall" Name="z.dll"/>
<File Id="ccc" KeyPath="no" Source="$(var.xSource)\OldNameService\a.dll"/>
<File Id="ddd" KeyPath="no" Source="$(var.xSource)\OldNameService\b.dll"/>
<File Id="eee" KeyPath="no" Source="$(var.xSource)\OldNameService\c.dll"/>
<File Id="fff" KeyPath="no" Source="$(var.xSource)\OldNameService\d.dll"/>
<File Id="ggg" KeyPath="no" Source="$(var.xSource)\OldNameService\e.dll"/>
<File Id="hhh" KeyPath="no" Source="$(var.xSource)\OldNameService\f.dll"/>
<File Id="iii" KeyPath="yes" Source="$(var.xSource)\OldNameService\g.exe"/>
<File Id="jjj" KeyPath="no" Source="$(var.xSource)\OldNameService\h.dll"/>
<File Id="kkk" KeyPath="no" Source="$(var.xSource)\OldNameService\i.dll"/>
<ServiceInstall Id="OldNameService" DisplayName="OldName Service" Name="NewName"
ErrorControl="normal" Start="auto" Type="ownProcess" Vital="yes" Description="OldName Service">
<ServiceConfig DelayedAutoStart="yes" OnInstall="yes" OnReinstall="yes"/>
</ServiceInstall>
<ServiceControl Id="OldNameServiceControl" Name="NewName"
Start="install" Stop="uninstall" Remove="uninstall" Wait="no"/>
</Component>
<Component Id="lll" Guid="mmm" NeverOverwrite="yes">
<File Id="nnn" KeyPath="yes" Source="$(var.xSource)\OldNameService\OldName.exe.config"/>
<util:XmlFile Id="UpdateOldNamelogFileName"
File="[#nnn]"
Action="setValue"
ElementPath="/configuration/appSettings/add[\[]#key='logFile'[\]]/#value"
Value="[ooo]oldname_YYYYMM.log" />
</Component>
<!--Recovery-Interval needs to be added in both cases new install as well as upgrades-->
<Component Id="qqq" Guid="r-r-r-r-r" NeverOverwrite="yes">
<Condition><![CDATA[INSTALDIR <> "" AND NOT REMOVE AND POSTV1 = ""]]></Condition>
<CreateFolder />
<util:XmlConfig Id="RecoveryInterval" Action="create" ElementPath="config/settings" File="[INSTALDIR]\oldname\OldNameService.exe.config" Node="element" On="install" Name="add" Sequence="1">
<util:XmlConfig Id="RecoveryInterval2" ElementId="RecoveryInterval" Name="key" Value="Recovery-Interval" File="[INSTALDIR]\oldname\OldNameService.exe.config" />
<util:XmlConfig Id="RecoveryInterval3" ElementId="RecoveryInterval" Name="value" Value="3600" File="[INSTALDIR]\oldname\OldNameService.exe.config" />
</util:XmlConfig>
</Component>
<!-- Analytics-->
<Component Id="eee" Guid="f-f-f-f-f" NeverOverwrite="yes">
<Condition><![CDATA[(INSTALDIR <> "") AND NOT REMOVE]]></Condition>
<CreateFolder />
<!-- Analytics-->
<util:XmlConfig Id="EnableAnalytics" Action="create" ElementPath="config/settings" File="[INSTALDIR]\oldname\OldNameService.exe.config" Node="element" On="install" Name="add" VerifyPath="/config/settings/add[\[]#key='EnableAnalytics'[\]]">
<util:XmlConfig Id="EnableAnalytics2" ElementId="EnableAnalytics" Name="key" Value="VEnableAnalytics" File="[INSTALDIR]\oldname\OldNameService.exe.config" />
<util:XmlConfig Id="EnableAnalytics3" ElementId="EnableAnalytics" Name="value" Value="1" File="[INSTALDIR]\oldname\OldNameService.exe.config" />
</util:XmlConfig>
<util:XmlConfig Id="AnalyticsTrackingId" Action="create" ElementPath="config/settings" File="[INSTALDIR]\oldname\OldNameService.exe.config" Node="element" On="install" Name="add" VerifyPath="/config/settings/add[\[]#key='AnalyticsTrackingId'[\]]">
<util:XmlConfig Id="AnalyticsTrackingId2" ElementId="AnalyticsTrackingId" Name="key" Value="AnalyticsTrackingId" File="[INSTALDIR]\oldname\OldNameService.exe.config" />
<util:XmlConfig Id="AnalyticsTrackingId3" ElementId="AnalyticsTrackingId" Name="value" Value="YwByAE3eVweXAAcAVwBasBUAAgAMsB0AAwAbzz==" File="[INSTALDIR]\oldname\OldNameService.exe.config" />
</util:XmlConfig>
</Component>
<!-- Added to handle upgrade scenario for assembly binding redirect for Newtonsoft.json -->
<Component Id="cmpNewtonsoftVersionUpgrade" Guid="{a-60CA-d-w-f}" NeverOverwrite="yes">
<Condition><![CDATA[(INSTALDIR <> "") AND NOT REMOVE]]></Condition>
<CreateFolder/>
<util:XmlConfig Id="AddRuntimeElement"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
Action="create" Node="element" Name="runtime" On="install"
ElementPath="configuration"
VerifyPath="/configuration/runtime/assemblyBinding/dependentAssembly/assemblyIdentity[\[]#name='Newtonsoft.Json'[\]]"
Sequence="1" />
<util:XmlConfig Id="AddAssemblyBindingElement"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
Action="create" Node="element" Name="assemblyBinding" On="install" ElementPath="configuration/runtime"
VerifyPath="/configuration/runtime/assemblyBinding/dependentAssembly/assemblyIdentity[\[]#name='Newtonsoft.Json'[\]]"
Sequence="2"/>
<util:XmlConfig Id="AddDependentAssemblyElement"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
Action="create" Node="element" Name="dependentAssembly" On="install"
ElementPath="configuration/runtime/assemblyBinding"
VerifyPath="/configuration/runtime/assemblyBinding/dependentAssembly/assemblyIdentity[\[]#name='Newtonsoft.Json'[\]]"
Sequence="3"/>
<util:XmlConfig Id="AddAssemblyIdentityElement"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
Action="create" Node="element" Name="assemblyIdentity" On="install"
ElementPath="configuration/runtime/assemblyBinding/dependentAssembly"
VerifyPath="/configuration/runtime/assemblyBinding/dependentAssembly/assemblyIdentity[\[]#name='Newtonsoft.Json'[\]]"
Sequence="4">
<util:XmlConfig Id="AddNameKey"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
ElementId="AddAssemblyIdentityElement" Name="name" Value="Newtonsoft.Json" />
<util:XmlConfig Id="AddPublicKeyToken"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
ElementId="AddAssemblyIdentityElement" Name="publicKeyToken" Value="30ad4fe6b2a6aeed" />
<util:XmlConfig Id="AddCulture"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
ElementId="AddAssemblyIdentityElement" Name="culture" Value="neutral" />
<util:XmlConfig Id="AddXmlnsOnAssemblyIdentity"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
ElementId="AddAssemblyIdentityElement" Name="xmlns" Value="urn:schemas-microsoft-com:asm.v1" />
</util:XmlConfig>
<util:XmlConfig Id="DeleteBindingRedirectElement"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
Action="delete" Node="element" Name="bindingRedirect" On="install"
ElementPath="configuration/runtime/assemblyBinding/dependentAssembly[\[]assemblyIdentity[\[]#name='Newtonsoft.Json'[\]][\]]"
VerifyPath="/configuration/runtime/assemblyBinding/dependentAssembly/bindingRedirect[\[]#oldVersion='0.0.0.0-6.0.0.0'[\]]"
Sequence="5" />
<util:XmlConfig Id="DeleteBindingRedirectElementoldserviceOnv4"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
Action="delete" Node="element" Name="bindingRedirect" On="install"
ElementPath="configuration/runtime/assemblyBinding/dependentAssembly[\[]assemblyIdentity[\[]#name='Newtonsoft.Json'[\]][\]]"
VerifyPath="/configuration/runtime/assemblyBinding/dependentAssembly/bindingRedirect[\[]#oldVersion='0.0.0.0-8.0.0.0'[\]]"
Sequence="6" />
<util:XmlConfig Id="AddBindingRedirectElement"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
Action="create" Node="element" Name="bindingRedirect" On="install"
ElementPath="configuration/runtime/assemblyBinding/dependentAssembly[\[]assemblyIdentity[\[]#name='Newtonsoft.Json'[\]][\]]"
VerifyPath="/configuration/runtime/assemblyBinding/dependentAssembly/bindingRedirect[\[]#oldVersion='0.0.0.0-9.0.0.0'[\]]"
Sequence="7">
<util:XmlConfig Id="AddOldVersionKey"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
ElementId="AddBindingRedirectElement" Name="oldVersion" Value="0.0.0.0-9.0.0.0" />
<util:XmlConfig Id="AddNewVersionKeyS3Uploader"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
ElementId="AddBindingRedirectElement" Name="newVersion" Value="9.0.0.0" />
<util:XmlConfig Id="AddXmlnsOnBindingRedirectS3Uploader"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
ElementId="AddBindingRedirectElement" Name="xmlns" Value="urn:schemas-microsoft-com:asm.v1" />
</util:XmlConfig>
<util:XmlConfig Id="AddNameSpaceToyElement"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
Action="create" Node="value" Name="xmlns" Value="urn:schemas-microsoft-com:asm.v1" On="install"
ElementPath="/configuration/runtime/assemblyBinding"
Sequence="8" />
<util:XmlConfig Id="AddNameSpaceToDependentAssemblyElement"
File="[INSTALDIR]\oldname\OldNameService.exe.config"
Action="create" Node="value" Name="xmlns" Value="urn:schemas-microsoft-com:asm.v1" On="install"
ElementPath="/configuration/runtime/assemblyBinding/dependentAssembly[\[]assemblyIdentity[\[]#name='Newtonsoft.Json'[\]][\]]"
Sequence="9" />
</Component>
</Directory>
EXAMPLE TRIAL FOR 1 COMPONENT:
<Component Id="cmpoldNameService" Guid="9-kj-4509-ko-B4F7700AFDCE"
SharedDllRefCount="no" KeyPath="no" NeverOverwrite="no" Permanent="no" Transitive="yes"
Win64="no" Location="either">
<Condition>FALSE</Condition>
<RemoveFolder Id="diytg" On="uninstall"/>
<RemoveFile Id="ghgj" On="uninstall" Name="a.dll"/>
<RemoveFile Id="uiu" On="uninstall" Name="b.dll"/>
<RemoveFile Id="hujhjn" On="uninstall" Name="c.dll"/>
<RemoveFile Id="okl" On="uninstall" Name="d.dll"/>
<RemoveFile Id="bbb" On="uninstall" Name="e.dll"/>
<RemoveFile Id="bbbb" On="uninstall" Name="f.dll"/>
<RemoveFile Id="kkkl" On="uninstall" Name="g.dll"/>
<RemoveFile Id="mmmm" On="uninstall" Name="h.dll"/>
<RemoveFile Id="nnn" On="uninstall" Name="i.exe"/>
<RemoveFile Id="bboo" On="uninstall" Name="j.dll"/>
<RemoveFile Id="ttt" On="uninstall" Name="k.dll"/>
<ServiceControl Id="OldNameServiceControl" Name="OldName"
Start="install" Stop="both" Remove="both" Wait="yes"/>
</Component>
MSI Minor Upgrades can't officially remove components or features. The workaround (Hack) is to keep the original components but supply them a zero byte file and set the Revaluate attribute (transitive bit in MSI) to true and give it a condition that will always evaluate to false. This way the Windows Installer transitions this component to not installed and the service is stopped and removed.
You'll have to keep this 0 byte fake component around until you do your next major upgrade. Then it can be removed.
To be honest, Minor Upgrades are very picky and if you don't already know these rules you might be better served by always doing major upgrades until you do. Minor upgrades can push you into a corner really hard if you let it.

Writing To Registry Using SID For Permission Instead Of Group Name

When writing a registry value, is there a way to use the SID instead of the group name? E.g. currently I have:
<Component Id="RegistryEntries" Guid="{------sanitized------}">
<RegistryKey Root="HKLM" Key="------sanitized------" ForceCreateOnInstall="yes">
<Permission User="Users" GenericRead="yes" Read="yes" GenericWrite="yes" />
<RegistryValue Name="ServerName" Action="write" Type="string" Value="" KeyPath="yes">
<Permission User="Users" GenericRead="yes" Read="yes" GenericWrite="yes" />
</RegistryValue>
</RegistryKey>
</Component>
which normally works, but fails in non-English languages, because of the "Users" name being translated. If I change the Permission elements to the SIDs, it should work (imo) but it does not:
<Component Id="RegistryEntries" Guid="{------sanitized------}">
<RegistryKey Root="HKLM" Key="------sanitized------" ForceCreateOnInstall="yes">
<Permission User="S-1-5-32-545" GenericRead="yes" Read="yes" GenericWrite="yes" />
<RegistryValue Name="ServerName" Action="write" Type="string" Value="" KeyPath="yes">
<Permission User="S-1-5-32-545" GenericRead="yes" Read="yes" GenericWrite="yes" />
</RegistryValue>
</RegistryKey>
</Component>
Instead it tries to search for a group literally called "S-1-5-32-545". Is there a way to do what I'm trying to do here? I know other non-wix installers can do this, but there is no information in the wix documentation on such things.
I had a very similar problem and could solve it:
Using <PermissionEx> from the Wix Util Extension instead of using
<Permission>.
Using the built-in custom action
WixQueryOsWellKnownSID to get the localized name of the Users group.
First, you need to add the WixUtilExtension reference to your project.
Then, you need to add the WixUtil namespace to your wxs source file:
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
So now you can use the PermissionEx element from the Wix Util Extension:
<util:PermissionEx User="[WIX_ACCOUNT_USERS]" GenericAll="yes" />
To make the property WIX_ACCOUNT_USERS available, you need to (implicitly) call the built-in custom action WixQueryOsWellKnownSID by adding a property reference to your <Product>:
<PropertyRef Id="WIX_ACCOUNT_USERS" />
This works for me using Wix 3.10 on Windows 10 (English and German)

Register 32-Bit COM Class in 64-Bit Component

I have built a ContextMenuHandler for the Windows Explorer shell using SharpShell. The assembly is built for AnyCPU, i.e. in MSIL, and can therefore run as both 32 bit and 64 bit.
I intend to run this on 64 bit windows only, however, 32 bit applications on windows 64 still use the 32 bit version of the shell for open dialogs, etc.
I have registered this assembly manually using the regasm tool on both architectures (32 & 64) and it works fine in the 64bit windows explorer. It also works from file open, and other shell provided dialogs, in 32 bit applications. This is the intended behavior, great!
The problem I have is writing the installation script, I'm using Wix 3.7 and I don't want to use regasm.
The 64 bit component is installed with:-
<Component Id="cmpMyAssembly64" Directory="INSTALL_TO_HERE"
Location="local" Win64="yes">
<File Id="filMyAssembly" KeyPath="yes" Source="mySource.dll"
Assembly=".net" AssemblyApplication="filMyAssembly"
ProcessorArchitecture="msil"/>
<Class Id="01201201-0000-0000-0000-012345670123" Description="My Handler"
Context="InprocServer32" ThreadingModel="both" ForeignServer="mscoree.dll">
<ProgId Id="A.ContextHandler" Description="Does something" />
</Class>
<RegistryKey Root="HKCR" Key="CLSID\{01201201-0000-0000-0000-012345670123}"
ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryKey Key="Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}">
<RegistryValue Value="" Type="string" />
</RegistryKey>
<RegistryKey Key="InprocServer32">
<RegistryKey Key="1.0.0.0">
<RegistryValue Name="Class" Value="aNamespace.theClass" Type="string" />
<RegistryValue Name="Assembly" Value="!(bind.assemblyFullName.filMyAssembly)" Type="string" />
<RegistryValue Name="RuntimeVersion" Value="v4.0.30319" Type="string" />
<RegistryValue Name="CodeBase" Value="file:///[#filMyAssembly]" Type="string" />
</RegistryKey>
<RegistryValue Name="Class" Value="aNamespace.theClass" Type="string" />
<RegistryValue Name="Assembly" Value="!(bind.assemblyFullName.filMyAssembly)" Type="string" />
<RegistryValue Name="RuntimeVersion" Value="v4.0.30319" Type="string" />
<RegistryValue Name="CodeBase" Value="file:///[#filMyAssembly]" Type="string" />
</RegistryKey>
</RegistryKey>
<RegistryValue Root="HKCR" Key="Directory\Background\shellex\ContextMenuHandlers\MyHandler" Value="{guid}" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Directory\shellex\ContextMenuHandlers\MyHandler" Value="{guid}" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Drive\shellex\ContextMenuHandlers\MyHandler" Value="{guid}" Type="string" Action="write" />
</Component>
The problem I have is with the 32bit version's registration. Because it uses the same assembly I don't want to install the same file twice. All I do is create another (32 bit) component and make the necessary registry changes.
<Component Id="cmp32BitVersion" Directory="INSTALL_TO_32"
Location="local" Win64="no">
<Class ... just like 64bit
<RegistryKey ... just like 64bit
</Component>
Now, I assumed that the Win64 yes/no is how windows installer decides which part of the registry to write to. For 64bit components it writes to HKCR..., for the 32 bit component it would write to HKLM\SOFTWARE\WOW6432Node\Classes. The problem I have is that because both components are using a file reference [#filMyAssembly] I am getting ICE69: Mismatched component reference, warnings. The code still builds but I would prefer not to get the warnings, people who don't heed warnings should expect trouble.
Anyway, my question is: what is the correct way to register a MSIL assembly for COM in both 64 and 32 bit applications using Wix/Windows Installer?
MikeR and nickheppleston at wix-users look like they've found a solution:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/64-bit-and-32-bit-Registry-Keys-in-same-MSI-td4439679.html
Thanks all who have responded. I followed MikeR's comments and came up
with the following - I found that I had to reference the x64
Architecture variable when defining both the Component and the
ComponentRef within the Feature section, as follows:
<Component Id="x86LicencingRegistryKeys" Guid="D113AD25-9E80-44E9-80C0-D66828809DBF" Win64="no">
<RegistryKey Id="x86ValidationCodeRegKey" Root="HKLM" Key="SOFTWARE\Product\Licencing" Action="createAndRemoveOnUninstall">
<RegistryValue Id="x86ValidationCodeRegValue" Name="ValidationCode" Action="write" Value="BgIAAACkAABSU0ExgAEAAAEAAQD9iAIysvGIxaJcIiENpOVTZbQosafHa9yXlfG0kxSWKJ01Hlfl+I+4ul5LhxoZkLo=" Type="string" />
<Permission User="Administrators" ChangePermission="yes" GenericAll="yes" />
<Permission User="CREATOR OWNER" ChangePermission="yes" GenericAll="yes" />
<Permission User="Power Users" ChangePermission="yes" GenericAll="yes" />
<Permission User="SYSTEM" ChangePermission="yes" GenericAll="yes" />
<Permission User="Users" ChangePermission="yes" GenericAll="no" GenericRead="yes" />
</RegistryKey>
<RegistryKey Id="x86LicenceKeyRegKey" Root="HKLM" Key="SOFTWARE\Product\Licencing" Action="createAndRemoveOnUninstall">
<RegistryValue Id="x86LicenceKeyRegValue" Name="LicenceKey" Action="write" Value="" Type="string" />
<Permission User="Administrators" ChangePermission="yes" GenericAll="yes" />
<Permission User="CREATOR OWNER" ChangePermission="yes" GenericAll="yes" />
<Permission User="Power Users" ChangePermission="yes" GenericAll="yes" />
<Permission User="SYSTEM" ChangePermission="yes" GenericAll="yes" />
<Permission User="Users" ChangePermission="yes" GenericAll="no" GenericRead="yes" />
</RegistryKey>
</Component>
<?if $(var.Architecture)=x64 ?>
<Component Id="x64LicencingRegistryKeys" Guid="49A15EB4-2DF8-4FF9-83ED-D306F076E232" Win64="yes">
<RegistryKey Id="x64ValidationCodeRegKey" Root="HKLM" Key="SOFTWARE\Product\Licencing" Action="createAndRemoveOnUninstall">
<RegistryValue Id="x64ValidationCodeRegValue" Name="ValidationCode" Action="write" Value="BgIAAACkAABSU0ExgAEAAAEAAQD9iAIysvGIxaJcIiENpOVTZbQosafHa9yXlfG0kxSWKJ01Hlfl+I+4ul5LhxoZkLo=" Type="string" />
<Permission User="Administrators" ChangePermission="yes" GenericAll="yes" />
<Permission User="CREATOR OWNER" ChangePermission="yes" GenericAll="yes" />
<Permission User="Power Users" ChangePermission="yes" GenericAll="yes" />
<Permission User="SYSTEM" ChangePermission="yes" GenericAll="yes" />
<Permission User="Users" ChangePermission="yes" GenericAll="no" GenericRead="yes" />
</RegistryKey>
<RegistryKey Id="x64LicenceKeyRegKey" Root="HKLM" Key="SOFTWARE\Product\Licencing" Action="createAndRemoveOnUninstall">
<RegistryValue Id="x64LicenceKeyRegValue" Name="LicenceKey" Action="write" Value="" Type="string" />
<Permission User="Administrators" ChangePermission="yes" GenericAll="yes" />
<Permission User="CREATOR OWNER" ChangePermission="yes" GenericAll="yes" />
<Permission User="Power Users" ChangePermission="yes" GenericAll="yes" />
<Permission User="SYSTEM" ChangePermission="yes" GenericAll="yes" />
<Permission User="Users" ChangePermission="yes" GenericAll="no" GenericRead="yes" />
</RegistryKey>
</Component>
<?endif ?>
<Feature Id="Complete" Title="TITLE" Description="Complete Package" Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR">
<ComponentRef Id="x86LicencingRegistryKeys" />
<?if $(var.Architecture)=x64 ?><ComponentRef Id="x64LicencingRegistryKeys" /><?endif ?>
</Feature>

install asp.net application on IIS using wix without IIS backward compatibilty on

I have created WiX installer that installs website in IIS but I have to keep IIS backward compatibility on.
<Component Id="VirtualDirectoryWebAppPool" Guid="{GIUD}" Permanent="yes">
<iis:WebAppPool Id="WebAppPool" Name="${ProductName}" ManagedRuntimeVersion="v4.0" ManagedPipelineMode="integrated" />
<CreateFolder />
</Component>
<Component Id="VirtualDirectoryWithoutWinAuth" Guid="{GUID}" Permanent="yes">
<Condition>TYPEOFAUTHENTICATION = "Forms"</Condition>
<iis:WebVirtualDir Id="WebVirtualDirectoryWithoutWinAuth" Alias="[VDNAME]" Directory="WEBUIFOLDER" WebSite="DefaultWebSite" >
<iis:WebApplication Id="WebApplicationWithoutWinAuth" Name="[VDNAME]" WebAppPool="WebAppPool" />
<iis:WebDirProperties Id="WebDirectoryPropertiesWithoutWinAuth" AnonymousAccess="yes" WindowsAuthentication="no" />
</iis:WebVirtualDir>
<CreateFolder />
</Component>
<Component Id="VirtualDirectoryWithWinAuth" Guid="{GIUD}" Permanent="yes">
<Condition>TYPEOFAUTHENTICATION = "Windows"</Condition>
<iis:WebVirtualDir Id="WebVirtualDirectoryWithWinAuth" Alias="[VDNAME]" Directory="WEBUIFOLDER" WebSite="DefaultWebSite" >
<iis:WebApplication Id="WebApplicationWithWinAuth" Name="[VDNAME]" WebAppPool="WebAppPool" />
<iis:WebDirProperties Id="WebDirectoryPropertiesWithWinAuth" AnonymousAccess="yes" WindowsAuthentication="yes" />
</iis:WebVirtualDir>
<CreateFolder />
</Component>
...
<iis:WebSite Id="DefaultWebSite" Description="Default Web Site" Directory="WEBUIFOLDER">
<iis:WebAddress Id="AllUnassigned" Port="80" />
</iis:WebSite>
But I do not want to keep the IIS backward compatibility on.