1

I implement wix to generate some msi. I'd like to maintain .bat file (that is packed within this wix project) to contain some work to do (and to be activated with some custom action) I added the .bet to my wix project in VS2010.

My question is

  1. how do I actually wrap it within the msi that on target machine the script will be available to run?
  2. How do I actually refer to that embedded batch file in the custom section element
4

2 に答える 2

3

タイプ18のカスタムアクションと思われるものを探しています:

The executable is generated from a file installed with the application. The 
Source field of the CustomAction table contains a key to the File table. The 
location of the custom action code is determined by the resolution of the target 
path for this file; therefore this custom action must be called after the file 
has been installed and before it is removed.

CustomAction要素には、まさにこのような場合のために ExeCommand 属性があります。次のようになります。

<CustomAction Id="ExecuteMyBatchFile" 
              FileKey="[#FileKey]" 
              ExeCommand="Arguments passed to batch file"
              Execute="deferred"/>

もちろん、これはバッチ ファイルが msi によってインストールされていることを前提としています。

于 2013-06-17T22:43:07.903 に答える