2011-02-03 13 views
0

対象のシステムに.msiがまだインストールされていない場合は、次のカスタムアクションを使用してIIS 7をインストールしています。私はerrrorに続き、インストールが失敗します。私はmsiでかなりのCAを使用しており、すべてうまく動作します。しかし、私はこの問題の原因を突き止めることができません。 cmdプロンプトでこのコマンドを直接実行すると完璧に動作します。 誰かが間違って何をしているかについて、どんな提案もできますか? Windowsは7 -32ビットpkgmgrを使用してIIS 7をインストールする

のCustomActionコード::私のログファイルから

<Property Id="INSTALLIISPROP" Value="[SystemFolder]"></Property> 
    <CustomAction Id="InstallIISCA" Return="check" Property="INSTALLIISPROP" Execute="deferred" ExeCommand=" start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility; IIS-ASP;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-Security;IIS-WindowsAuthentication;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-WebServerManagementTools; IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;NetFx3"></CustomAction><InstallExecuteSequence><Custom Action="InstallIISCA" Before="InstallFinalize"><![CDATA[NOT Installed AND IISMAJORVERSION]]></Custom></InstallExecuteSequence> 

エラー:

Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: InstallIISCA, location: [SystemFolder], command: start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-Security;IIS-WindowsAuthentication;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;WAS-WindowsActivationService; WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;NetFx3

詳細情報:私は、次のコードを使用しています

ターゲットOSをアドバイスしてくださいIISが既にインストールされているか確認してください。

<Property Id="IISMAJORVERSION"><RegistrySearch Id="IISInstalledVersion" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp" Type="raw" Name="MajorVersion" /></Property><Condition Message="Error: This application requires IIS 7.0 to be installed. Please install IIS 7.0 and run this installer again.">IISMAJORVERSION</Condition> 

もう一方のマシンでは、IISがインストールされていないため、この状態は真です。しかし、msiを使用するとエラーメッセージは表示されず、ログファイルには次のようなメッセージが表示されます。 MSI(CC:F8)[15:32:00:761]:Skip action:InstallIISCA(条件はfalse)??どのようにこれを可能にすることができます。

はまた、C#での代替CAを作成したが、そのまた、Windowsパッケージマネージャのエラーで失敗:操作が

[CustomAction] 
    public static ActionResult InstallIIS(Session session)   
    { 
     try 
     { 
      Process proc = new Process(); 
      string cmd = @"C:\Windows\System32\pkgmgr.exe"; 

      string cmdargument = 
       @" start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures; 
       IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment; 
       IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging; 
       IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-Security;IIS-WindowsAuthentication; 
       IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-WebServerManagementTools; 
       IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;WAS-WindowsActivationService; 
       WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;NetFx3"; 

      proc = Process.Start(cmd, cmdargument); 
      proc.WaitForExit(); 
      proc.Close(); 
     } 
     catch (Exception objException) 
     { 
      // Log the exception 
      MessageBox.Show("Error message:" + objException.Message); 
     } 
     return ActionResult.Success; 
    } 

失敗誰かがこれを達成するためにどのように私をお勧めすることはできますか?心から感謝!

+0

よく質問を整理するために編集しましたが、質問のタイトルをどうするかわかりません。タイトルをコミュニティにとって意味のあるものにする。 「Kim My starred items」は意味がありません。 – Amy

+0

私は申し訳ありませんyodaj007です。私は "pkgmgrを使用してIIS 7をインストールする"と入力してタイトルとして「 」と入力しました。どうしてそれがどうしてそんなに愚かなものに変わったのかわからない。私の注意を喚起してくれてありがとう。 – Kim

答えて

3

私はそれを理解しました!

誰が "文字列cmdargument" を初期化するとき、あなたのcmdargumentになりますので、 "W /スタートのpkgmgrを" 使​​用しないでください

<Property Id="INSTALLIISPROP" Value="C:\Windows\System32\dism.exe"></Property> 
    <CustomAction Id="InstallIISCA" Return="check" Property="INSTALLIISPROP" Execute="deferred" HideTarget="yes" Impersonate="yes" 
     ExeCommand="/Online /Enable-Feature /FeatureName:IIS-WebServerRole .....(all remaining parameters) /> 
+0

ありがとう!私もインストーラでNSKインストーラで構成されたpkgmgr.exeを使ってIIS7の機能をインストールしようとしています。しかし、私は "Windowsパッケージマネージャが0x8007000Bで失敗しました"という例外を受けています。 今日はDISM.exeを試してみます:) – Riju

+0

DISM.exeは、Windows Server 2008 R2およびWindows 7以降でのみ使用できます。これは、IIS 7.5でのみ使用可能であることを意味します。 7.0(Server 2008およびVista)では、pkgmgr.exeが必要です。 – MichielB

2

同じ:-)を必要とした場合の解決策投稿:

cmdargument = @" /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures; 
       IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment; 
       IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging; 
       IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-Security;IIS-WindowsAuthentication; 
       IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-WebServerManagementTools; 
       IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;WAS-WindowsActivationService; 
       WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;NetFx3"; 
関連する問題