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