2012-06-29 2 views
5

나는 C# COM .dll을 가지고 있습니다. 일단 .dll을 설치하고 싶지만 x86과 x64 모두에 등록해야합니다.WiX : 레지스터 .NET COM 구성 요소 모두 x86 x64

여기 윅스는 64를 등록하는 내가 가진의 :

<Component Id="NETDLL.dll" Directory="INSTALLDIR"> 
    <File Id="NETDLL.dll" Name="NETDLL.dll" KeyPath="yes" Source="..\NETDLL.dll" /> 
    <Class Id="{78BE...}" Context="InprocServer32" Description="NETDLL" ThreadingModel="both" ForeignServer="mscoree.dll"> 
    <ProgId Id="NETDLL" Description="NETDLL" /> 
    </Class> 
    <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" /> 
    <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\InprocServer32\1.0.1.0" Name="Class" Value="NETDLL" Type="string" Action="write" /> 
    <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\InprocServer32\1.0.1.0" Name="Assembly" Value="NETDLL, Version=1.0.1.0, Culture=neutral" Type="string" Action="write" /> 
    <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\InprocServer32\1.0.1.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" /> 
    <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\InprocServer32\1.0.1.0" Name="CodeBase" Value="file:///[#NETDLL.dll]" Type="string" Action="write" /> 
    <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\InprocServer32" Name="Class" Value="NETDLL" Type="string" Action="write" /> 
    <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\InprocServer32" Name="Assembly" Value="NETDLL, Version=1.0.1.0, Culture=neutral" Type="string" Action="write" /> 
    <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" /> 
    <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\InprocServer32" Name="CodeBase" Value="file:///[#NETDLL.dll]" Type="string" Action="write" /> 
    <RegistryValue Root="HKCR" Key="Component Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Name="0" Value=".NET Category" Type="string" Action="write" /> 
    <RegistryKey Root='HKLM' Key='Software\NETDLL'> 
    <RegistryValue Name='Description' Type='string' Value='NETDLL'/> 
    </RegistryKey> 
</Component> 

가 어떻게 HKCR \ CLSID에 쓸 수 HKCR \ Wow6432Node \ CLSID, HKLM \ 소프트웨어 및 HKLM \ SOFTWARE \ Wow6432Node를 한 번에?

답변

0

regasm.exe 스위치/x86 및/x64를 사용해보십시오.

또한 regasm.exe의 32 비트 및 64 비트 버전이 있습니다. 하나는 C:\windows\microsoft .net\<version>\Framework이고 다른 하나는 Framework64입니다. 도움이되는지 확인하십시오.

+0

커스텀 액션을 작성하는 것은 힘들며, 언인스톨 또는 롤백과 함께 작동하는 것은 의심 스럽다. HKLM에 값을 추가하기 위해'reg.exe '를 실행해야 할 것처럼 보입니다. –

+0

regasm.exe는/x86 또는/x64 명령 줄 스위치를 지원하지 않습니다. –

0

ProgramFiles64FolderProgramFilesFolder에 각각 하나씩 두 개의 파일을 설치하십시오. 낭비 .5MiB,하지만 간단합니다.

+0

AnyCPU로 .NET 어셈블리를 컴파일해야합니까? – tronda

0

나는 두 개의 구성 요소, 64 비트 다른 하나는 86 등록을위한 하나 주위를 재생하여 x86 및 64 비트에 대한 64 비트 시스템에서 동일한 DLL을 등록 성공 :

<Component Id="NETDLL.dll" Directory="INSTALLDIR" Guid="*"> 
    <Class Id="{78BE...}" Context="InprocServer32" Description="NETDLL" 
     ThreadingModel="both" ForeignServer="mscoree.dll"> 
     <ProgId Id="NETDLL" Description="NETDLL" /> 
    </Class> 
    <File Id="NETDLL.dll" Name="NETDLL.dll" KeyPath="yes" 
      Source="..\NETDLL.dll" /> 
    <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\Implemented Categories {62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" /> 
    ... 
</Component> 
<Component Id="NETDLLWin64.dll" Guid="{885F75B1-3046-42BD-8B37-F8FA0E8D7A51}" Win64="yes" Directory="INSTALLDIR"> 
    <Class Id="{78BE...}" Context="InprocServer32" Description="NETDLL" ThreadingModel="both" ForeignServer="mscoree.dll"> 
     <ProgId Id="NETDLL" Description="NETDLL" /> 
    </Class> 
    <RegistryValue Root="HKCR" Key="CLSID\{78BE...}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" /> 
    ... 
</Component> 

내가 가이 드 를 추가 - 구성 요소 노드의 속성에서 두 번째 구성 요소의 Id를 변경하고 Win64 = "예" Attribut을 추가했습니다. 또한 나는 파일을 복제하지 않는다. 의존성이 많이 있고 파일을 복제하지 않는다면 도움이되기를 바랍니다.

관련 문제