2011-04-08 22 views
1

this articleを使用して私のインストーラにngenを含めることを試みています。インストール中にngenを同期して(優先度= 0で)実行したいが、管理者権限が必要です。だから、今私は、ログにメッセージを次ています高い権限でWiXからngenを実行するにはどうすればよいですか?

MSI (s) (74:2C) [18:30:14:310]: Invoking remote custom action. DLL: C:\windows\Installer\MSI60B0.tmp, Entrypoint: ExecNetFx 
ExecNetFx: Microsoft (R) CLR Native Image Generator - Version 4.0.30319.1 
ExecNetFx: Copyright (c) Microsoft Corporation. All rights reserved. 
ExecNetFx: Installing assembly C:\myapp\myapp.exe 
ExecNetFx: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) 
ExecNetFx: Administrator permissions are needed to use the selected options. Use an administrator command prompt to complete these tasks. 
ExecNetFx: Error 0xffffffff: Command line returned an error. 
ExecNetFx: failed to execute Ngen command (with error 0xffffffff): C:\windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe install "C:\myapp\myapp.exe", continuing anyway 
ExecNetFx: Microsoft (R) CLR Native Image Generator - Version 4.0.30319.1 
ExecNetFx: Copyright (c) Microsoft Corporation. All rights reserved. 
ExecNetFx: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) 
ExecNetFx: Administrator permissions are needed to use the selected options. Use an administrator command prompt to complete these tasks. 
ExecNetFx: Error 0xffffffff: Command line returned an error. 
ExecNetFx: failed to execute Ngen command (with error 0xffffffff): C:\windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe update /queue, continuing anyway 

管理者権限をユーザーに尋ねるための簡単な方法は、この時点で(標準UACプロンプトを使用して)あり、NGENが開始されたとき?ユーザーが「いいえ」を押すと、ngenなしで処理を進めます。はいの場合 - ngenを実行してアプリケーションをプリコンパイルします。 考えていますか?

ありがとうございました。

答えて

2

WiXはすでにNGenカスタムアクションを実行しています(Execute = "deferred" Impersonate = "no")。 .msiパッケージは、実行できるようにマシン単位である必要があります。

関連する問題