COPYコマンドはWIXカスタムアクションを使用して機能しません
質問
私は以下のCustomAction
を持っています:
<CustomAction Id="CopyToSystem32" ExeCommand="copy /y 64bits.txt C:\Windows\System32" Directory="INSTALLFOLDER" Impersonate="no" Execute="deferred" Return="asyncWait" />
<InstallExecuteSequence>
<Custom Action="CopyToSystem32" After="InstallFiles" >VersionNT64</Custom>
</InstallExecuteSequence>
.
SO 64ビットOSを検出すると、System32フォルダにファイルをコピーします。.batファイルで実行するとうまく機能します。しかし、私はそれがバッチコマンドになるのを好むでしょう。
ログは次のように言っています:
MSI (s) (74:AC) [10:08:33:473]: Executing op: ActionStart(Name=CopyToSystem32,,)
Action 10:08:33: CopyToSystem32.
MSI (s) (74:AC) [10:08:33:473]: Executing op: CustomActionSchedule(Action=CopyToSystem32,ActionType=3234,Source=C:\Program Files (x86)\SetupProject\,Target=copy /y 64bits.txt C:\Windows\System32,)
MSI (s) (74:AC) [10:08:33:474]: Executing op: ActionStart(Name=RegisterProduct,Description=Registering product,Template=[1])
Action 10:08:33: RegisterProduct. Registering product
MSI (s) (74:AC) [10:08:33:474]: Executing op: ChangeMedia(,MediaPrompt=Please insert the disk: ,MediaCabinet=1\cab1.cab,BytesPerTick=0,CopierType=1,,,SignatureRequired=0,,,IsFirstPhysicalMedia=1)
MSI (s) (74:AC) [10:08:33:474]: Executing op: DatabaseCopy(DatabasePath=C:\Windows\Installer\32ea43.msi,ProductCode={0C013216-61FB-4283-AF0A- 6CB264019F5B},,,)
MSI (s) (74:AC) [10:08:33:474]: Note: 1: 1402 2: UNKNOWN\Products\612310C0BF163824FAA0C62B4610F9B5\InstallProperties 3: 2
1: CopyToSystem32 2: 1631
.
私のExeCommand
がファイルをコピーしていない理由についての任意のアイデア?
ありがとう!
解決
afaik copy
はコマンドシェルインタプリタの一部であり、それ自身のコマンドではありません。e...あなたはあなたがねんであなたがこれをチェックすることができます。dir copy.* /s
フォルダにWindows
を実行してください。copy
を独立して実装するファイルはありません。
できること:コマンドインタプリタの呼び出しを追加します。
cmd /c copy /y 64bits.txt C:\Windows\System32
.
/c
-parameterは、実行後に閉じるようにインタプリタに指示します([%COMSPEC]
の代わりにcmd
-environment変数を使用することもできます)。こちらの。
たぶんあなたはまた、CAQuietExecute-element < a>を使用することもできます。?このようにしてシェルウィンドウなどに対処する必要はありません。
所属していません StackOverflow