2017-03-07 7 views
0

64ビットシステムでコマンドAspnet_regiis.exeを実行すると、aspでIISを有効にするwixインストーラを作成しました。しかし、このコマンドは、このリンクに係るIIS registration with ASPwixインストーラでASPによるIISのプラットフォーム独立登録

ビットシステム32に

の%windir%\ Microsoft.NET \ Frameworkの\ V2.0.50727 32ビットまたは64ビット・システムに応じて、.NETフレームワークフォルダに異なるパスを有します\ Aspnet_regiis.exeに-i

と64ビットシステム上で

%のWINDIR%\ Microsoft.NET \ Framework64 \ v2.0.50727の\ Aspnet_regiis.exeに-i

私がカバーするために私のインストーラを拡張する必要があります32ビットと64ビットの両方のpl atforms。

「エラーCNDL0150:しかし

<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
    <?if $(var.Platform) = x64 ?> 
     <?define IISRegCommand = "C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i" ?>  
    <?else ?> 
     <?define IISRegCommand = "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i" ?> 
    <?endif ?> 
    <Product Id="*" Name="IISRegistration" Language="1033" Version="1.0.0.0" Manufacturer="Eurotherm By Schneider-Electric" UpgradeCode="4bfb41e4-5701-4a47-9c4c-cdb657ab7a62"> 
     <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated"/> 

     <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> 
    <Media Id="1" Cabinet="cab1.cab" EmbedCab="yes" /> 

     <Feature Id="ProductFeature" Title="IISRegistration" Level="1"> 
      <ComponentGroupRef Id="ProductComponents" /> 
     </Feature> 

     <CustomAction Id="IISRegistration" Directory="INSTALLFOLDER" 
      ExeCommand="$(var.IISRegCommand)" 
      Return="check"/> 

     <InstallExecuteSequence> 
      <Custom Action="IISRegistration" After="InstallFiles"></Custom> 
     </InstallExecuteSequence> 
    </Product> 

    <Fragment> 
    <Directory Id="TARGETDIR" Name="SourceDir"> 
     <Directory Id="CommonAppDataFolder"> 
     <Directory Id="Company" Name="Company"> 
      <Directory Id="INSTALLFOLDER" Name="Application" /> 
     </Directory> 
     </Directory> 
    </Directory> 
    </Fragment> 

    <Fragment> 
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> 
     <Component Id="ProductComponent" Guid=""> 
     <File Id="File1" Name="IISRegistration.txt" Source="IISRegistration.txt"></File> 
     </Component> 
    </ComponentGroup> 
    </Fragment> 
</Wix> 

私は、私は次のエラーを取得するcandle.exeでそれをコンパイルする場合、次のように私は、プラットフォームに基づいた前処理変数を定義することによって、この答えanswer on platform independentしようとした未定義プリプロセッサ変数 '$(var.Platform)' "

私はwix 3.11を使用しています。 これを解決する方法はありますか?

答えて

0

が.wixprojにこのコードを追加してください:

<PropertyGroup> 
    <DefineConstants> 
     $(DefineConstants); 
     Platform=$(Platform) 
    </DefineConstants> 
</PropertyGroup> 
関連する問題