1
私はこのディレクトリ構造を持っているとしましょう。WIX UI上書きフォルダパスカスタムアクション
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="test" Name="test">
<Component Id="file" Guid="*">
<File Id="file" Source="file.dll"></File>
</Component>
</Directory>
</Directory>
これは、file.dllをC:\ testにインストールします。私がしたいのは、インストール中にC:\ newpath \でそのファイルのディレクトリを上書きし、そこにファイルをインストールすることです。私は運がないカスタムアクションでこれを試しました。私はので、私はそれが呼ばれています、それだけでファイルがまだCにインストールされています知っているデバッグ行が書かれて見ています:\テスト
<InstallExecuteSequence>
<Custom Action="OverwriteDir" After="CostFinalize" />
</InstallExecuteSequence>
[CustomAction]
public static ActionResult OverwriteDir(Session session)
{
System.Diagnostics.Debug.WriteLine(session["tester"]);
session["tester"] = "C:\\newpath";
return ActionResult.Success;
}
私は違った何ができますか?
ありがとう!私は資産を大文字にしていない – aherrick