0

I am Using WiX 3.5 for making installer, i need to copy many files and folder. I used heat.exe to do that, and it is working fine. But i need to call bat file during installation, and the bat file is present in those folders i mentioned above. That bat file is depended on some other files. I am able to call the batch file but by that time the other files are not loaded. Below is the custom action i am using for running bat file.

<Custom Action="InstallFeature" After="InstallFinalize"><![CDATA[
    (&TypicalFeature=3) AND NOT(!TypicalFeature=3)
]]></Custom>

Need help, may be files are loading after i call the bat file.

Thanks Ravi S

4

1 回答 1

3

从 MSI 调用批处理文件是一个非常糟糕的主意。MSI 是声明性的 - 您只需定义系统在成功安装后的外观,如果出现问题,MSI 可以回滚更改。

但是,通过使用批处理文件,Windows Installer 不知道对系统进行了哪些更改,也无法回滚任何内容。

我会查看批处理文件在做什么,并在 WiX 中或通过 C++/C# 中的自定义操作和相应的回滚操作来实现它正在做的事情。(本机代码是最好的,但很难。托管代码是次要的,VBScript 是最后的手段——但仍然比批处理文件好)

于 2012-08-14T02:18:56.957 回答