> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/jp/endpoint-privilege-manager/custom-tooling/jobs-and-plugins/custom-plugin-guide/plugin-examples/plugin-install-launcher.md).

# Windows Install Launcher

**想定読者:** IT管理者およびデプロイ担当者。本ページでは **`InstallLauncher`** について取り扱います。`RedirectEvaluator` プラグインと連携するヘルパーコンポーネントで、標準ユーザーが `.msi` インストーラーを対話的に実行できるようにし、入れ子のUACプロンプトは表示されません。

## `InstallLauncher` プラグインの役割 <a href="#what-the-installlauncher-plugin-does" id="what-the-installlauncher-plugin-does"></a>

**最小権限**が適用されたユーザーが `.msi` ファイルを開こうとすると、通常はWindows UAC経由で管理者認証情報の入力を求められ、標準ユーザーはこれを満たせません。**`InstallLauncher`** はリダイレクト機能で昇格要求を取り込み、すでに昇格済みのプロセス内から `msiexec.exe` を実行することで、入れ子のUACプロンプトを回避します。

その結果、ユーザーには選択したパッケージ向けの標準的なWindows Installerインターフェースが表示され、インストール時点で管理者認証情報を求められることなく、昇格はEPMによって透過的に処理されます。

## 要件 <a href="#prerequisites" id="prerequisites"></a>

<table><thead><tr><th width="118.6666259765625">バージョン</th><th>エンドポイントに.NETランタイムが必要か</th></tr></thead><tbody><tr><td>2.0</td><td><strong>はい</strong>。2.0では <code>InstallLauncher</code> はAOTコンパイルされていないため、実行前に対象エンドポイントへ.NETランタイムのインストールが必要</td></tr><tr><td>2.1+</td><td>いいえ。 <code>InstallLauncher</code> はAOT (Ahead-of-Time) コンパイル済みで、単体で動作</td></tr></tbody></table>

EPM v2.0を使用している場合、ログでは `InstallLauncher` のリダイレクトが一致しているように見えるのに、ランチャーが実行されない (または即座に終了する) ときは、エンドポイントに.NETランタイムがあることを確認してください。v2.1以降へアップグレードすると、この依存関係は不要になります。

### 対応する呼び出し方法 <a href="#supported-invocation-methods" id="supported-invocation-methods"></a>

Install Launcherは、EPMに **PrivilegeElevation** イベントとして届く `.msi` インストーラーの呼び出しを取り込みます。v2.0およびv2.1での呼び出し方法ごとの対応状況は、以下のとおりです。

| 呼び出し方法                                                          | 2.0 / 2.1での対応                                                                                   |
| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| KeeperClient経由で **\[権限昇格をリクエスト]** を選び、`.msi` ファイルを選択            | ✅ 対応                                                                                            |
| KeeperAgentの **\[+]** ボタン (**\[権限昇格をリクエスト]**) から `.msi` ファイルを選択 | ✅ 対応                                                                                            |
| エクスプローラーで `.msi` をダブルクリック                                       | ❌ 非対応 (2.2で予定)                                                                                  |
| `.msi` を右クリック → **\[インストール]**                                   | ❌ 非対応 (2.2で予定)                                                                                  |
| コマンドプロンプトまたはPowerShellから `msiexec /i <package>.msi`             | ❌ 非対応                                                                                           |
| PowerShellから `Start-Process msiexec.exe -Verb RunAs ...`        | ⚠️ PrivilegeElevationイベントが発生しリダイレクトルールは一致するが、通常どおりのインストール操作にはならない。代わりに **\[権限昇格をリクエスト]** フローを使用 |

## 動作の流れ <a href="#how-it-works" id="how-it-works"></a>

`InstallLauncher` は LaunchPrivilegeElevation フロー内のリダイレクト先として動作します。

1. ユーザーが**KeeperClient**を開く (またはKeeperAgentの **\[+]** ボタンをクリックし)、**\[権限昇格をリクエスト]** を選択します。
2. インストールしたい `.msi` ファイルを参照して選びます。
3. 選択した `.msi` を対象とする `msiexec.exe` のPrivilegeElevationイベントが発生します。
4. `RedirectEvaluator` プラグインで構成済みルールが一致し、実行が `InstallLauncher.exe` へリダイレクトされます。
5. Install Launcherにより、EPMから付与された昇格コンテキストで `.msi` が実行されます。エンドユーザーが管理者認証情報を入力する必要はありません。

`msiexec.exe` はすでに昇格済みのプロセス内から起動されるため、インストーラーやその子プロセスに対する二次的なUACプロンプトは発生しません。

リダイレクト機能の背景およびリダイレクトルールの評価方法については、[リファレンス: リダイレクト機能](/keeperpam/jp/endpoint-privilege-manager/custom-tooling/jobs-and-plugins/custom-plugin-guide/plugins-reference/redirect-capability.md)をご参照ください。

## あわせて必要なPrivilegeElevationポリシー <a href="#required-paired-privilegeelevation-policy" id="required-paired-privilegeelevation-policy"></a>

{% hint style="info" icon="lightbulb-exclamation-on" %}
`RedirectEvaluator` のSettingsUpdateポリシー (後述) はリダイレクトルールのみを定義します。あわせて `msiexec.exe` に一致するPrivilegeElevationポリシーも必要です。リダイレクトはPrivilegeElevationポリシー評価の後にのみ発生します。このポリシーがない場合、`.msi` はFileAccess対象として再評価され、ポリシーレジストリで処理されずに抜け落ちます。
{% endhint %}

あわせて必要なPrivilegeElevationポリシーには `"AllowChildProcesses": true` を含める必要があります。インストール中に `msiexec.exe` が子プロセスを起動するためです。

#### あわせて必要なPrivilegeElevationポリシーの例 (要約)

```json
{
  "PolicyName": "Allow msiexec elevation for Install Launcher",
  "PolicyType": "PrivilegeElevation",
  "Status": "enforce",
  "Extension": {
    "Targets": [
      {
        "ExePattern": "msiexec\\.exe",
        "AllowChildProcesses": true
      }
    ],
    "Controls": {
      "AutoApprove": true
    }
  }
}
```

## デプロイ <a href="#deployment" id="deployment"></a>

`InstallLauncher` は他のEPMコンポーネントとあわせてビルドおよびデプロイされます。

* **ビルド出力先:** `publishoutput/Jobs/bin/InstallLauncher/`
* **実行時の配置先:** 他のEPMジョブツールと同じ `Jobs/bin/` ディレクトリへデプロイ

`RedirectEvaluator` プラグインは `Jobs/bin/` から短い名前で `InstallLauncher` を解決します。標準の配置場所にデプロイしていれば、追加のパス設定は不要です。

## 組み込み MSI リダイレクトルール <a href="#built-in-msi-redirect-rule" id="built-in-msi-redirect-rule"></a>

デフォルトの `RedirectEvaluator` プラグイン定義 (`KeeperPrivilegeManager/Plugins/RedirectEvaluator.json`) には、`metadata.redirect.rules` 配下に `.msi` ファイル向けのリダイレクトルールがあらかじめ含まれています。

```json
{
  "sourceExePattern": "msiexec\\.exe",
  "commandLinePattern": "\\.msi",
  "elevationOnly": true,
  "targetExe": "InstallLauncher",
  "targetArguments": "\"{FilePath}\" {CommandLine}"
}
```

このルールは、コマンドライン上で `.msi` パスを伴って `msiexec.exe` が呼び出される特権昇格要求に一致し、ファイルパスと元のコマンドラインを引数として `InstallLauncher` へリダイレクトします。

特定のディレクトリに限定する、`nonAdminOnly` を追加する、他のインストーラータイプ向けのルールを追加するなど、このルールを変更または拡張する場合は、エンドポイント上で `Plugins/RedirectEvaluator.json` を直接編集するか、`SettingsUpdate` ポリシーで更新した構成をプッシュします。ルール変更を一元的にデプロイする方法の詳細は、[Redirect Evaluator](/keeperpam/jp/endpoint-privilege-manager/custom-tooling/jobs-and-plugins/custom-plugin-guide/plugin-examples/redirectevaluator-plugin-configuration.md)をご参照ください。

## プレースホルダートークン <a href="#placeholder-tokens" id="placeholder-tokens"></a>

リダイレクトルールの `targetArguments` フィールドでは、以下のトークンが利用できます。`RedirectEvaluator` はこれらを展開してから `InstallLauncher` に渡します。

<table><thead><tr><th width="192">トークン</th><th>値</th></tr></thead><tbody><tr><td><code>{FilePath}</code></td><td>昇格要求から取得した <code>.msi</code> ファイルのフルパス</td></tr><tr><td><code>{FileName}</code></td><td>ベースファイル名のみ (例: <code>installer.msi</code>)</td></tr><tr><td><code>{Directory}</code></td><td>ファイルを含むディレクトリ</td></tr><tr><td><code>{CommandLine}</code></td><td>元の昇格要求のコマンドライン (空の場合あり)</td></tr></tbody></table>

デフォルトルールは `"{FilePath}" {CommandLine}` を使用し、スペースを含むパスに対応するためフルパスを引用符で囲み、ユーザーまたは呼び出し元アプリケーションが指定した追加引数を続けて渡します。

## 昇格対象のファイル拡張子 <a href="#elevation-file-extensions" id="elevation-file-extensions"></a>

EPMのコンパニオンアプリ (Keeper AgentおよびKeeper Client) は、アプリケーション実行ファイルと同じ場所にデプロイされる `elevation-allowed-extensions.json` を使い、特権昇格要求の対象となるファイル拡張子を判定します。`.msi` 拡張子はデフォルトでこの一覧に含まれています。

**デプロイ向けに許可する拡張子をカスタマイズする**場合は、以下の構造の JSON ファイルを作成し、環境変数 `KEEPER_ELEVATION_EXTENSIONS_CONFIG` でそのパスを指定します。

```json
{
  "windows": [".msi", ".exe"],
  "linux": [".sh", ".run"],
  "macos": [".pkg", ".dmg"]
}
```

プラットフォームキーを省略した場合、そのプラットフォームの組み込みデフォルトは維持されます。環境変数 `KEEPER_ELEVATION_EXTENSIONS_CONFIG` にカスタムファイルのフルパスを設定すると、実行時にデフォルトを上書きできます。

## ユーザーインターフェース <a href="#user-interface" id="user-interface"></a>

`InstallLauncher` は `UseShellExecute` を使って `msiexec.exe` を起動するため、Windows Installer UIは完全にネイティブです。`.msi` パッケージとその引数が指定するインターフェースが、そのままユーザーに表示されます。

* カスタム引数なし → 標準的な対話型インストールウィザード
* コマンドラインに `/quiet` または `/qn` → パッケージ定義に従ったサイレントまたはUI削減インストール

EPM独自のUIは追加されません。`InstallLauncher` はユーザーから透過的に見えます。

## サイレントモード / 自動化 <a href="#silent-mode-automation" id="silent-mode-automation"></a>

デフォルトでは、通常の対話型昇格中に `InstallLauncher` はstderrへ何も出力しません。ユーザーが余分な表示や操作を行う必要はありません。

コンソールが接続された自動化やスクリプト実行の文脈で失敗の詳細を表示したい場合は、以下のいずれかの方法でサイレントモードを有効にします。

<table><thead><tr><th width="302">方法</th><th>値</th></tr></thead><tbody><tr><td>コマンドラインフラグ</td><td><code>--silent</code> または <code>--quiet-ui</code> または <code>/silent</code></td></tr><tr><td>環境変数</td><td><code>KEEPER_INSTALL_LAUNCHER_SILENT=1</code> または <code>KEEPER_INSTALL_LAUNCHER_SILENT=true</code></td></tr></tbody></table>

サイレントモードでは、`msiexec.exe` がゼロ以外の終了コードで終了した場合、`InstallLauncher` がstderrに短い失敗サマリーを書き出します。プロセスの終了コードは、この設定にかかわらず常にWindows Installerの終了コードです。

## CLIリファレンス <a href="#cli-reference" id="cli-reference"></a>

`InstallLauncher` はリダイレクトフローとは独立して、コマンドプロンプトやスクリプトから直接呼び出すこともできます。テスト、自動化、スクリプトによるデプロイに有用です。

**基本的なインストール**

```
InstallLauncher C:\path\to\package.msi
```

**サイレントインストール**

```
InstallLauncher --silent C:\path\to\package.msi /qn
```

**msiexecの完全制御** (修復、アンインストール、プロダクトコード)

```
InstallLauncher -- /x {PRODUCT-CODE} /qn
```

`/` または `-` で始まる引数を `InstallLauncher` が自身のフラグとして解釈せず、`msiexec.exe` に直接渡す必要がある場合は、`--` を区切りとして使います。`--` 以降はすべてそのまま転送されます。

<table><thead><tr><th width="287.333251953125">引数</th><th>説明</th></tr></thead><tbody><tr><td><code>&#x3C;path>.msi [args]</code></td><td><code>.msi</code> ファイルへのパス。必要に応じてmsiexec引数を続ける</td></tr><tr><td><code>-- &#x3C;msiexec args></code></td><td><code>msiexec.exe</code> へ引数を直接渡す (修復、アンインストール、プロダクトコード向け)</td></tr><tr><td><code>--silent</code> / <code>--quiet-ui</code> / <code>/silent</code></td><td>msiexecがゼロ以外で終了したとき、失敗の詳細をstderrに出力</td></tr></tbody></table>

## まとめ <a href="#summary" id="summary"></a>

<table><thead><tr><th width="176.666748046875">項目</th><th>内容</th></tr></thead><tbody><tr><td><strong>役割</strong></td><td>すでに昇格済みのプロセスから <code>msiexec.exe</code> を実行し、<code>.msi</code> ファイルをUACプロンプトなしでインストール</td></tr><tr><td><strong>トリガー</strong></td><td>LaunchPrivilegeElevationフロー内の <code>RedirectEvaluator</code> 組み込みMSIリダイレクトルール経由</td></tr><tr><td><strong>デプロイ先</strong></td><td>他のEPMジョブツールと同じ <code>Jobs/bin/InstallLauncher/</code></td></tr><tr><td><strong>デフォルトルール</strong></td><td><code>Plugins/RedirectEvaluator.json</code> に同梱。コマンドライン上の <code>msiexec.exe</code> + <code>.msi</code> に一致</td></tr><tr><td><strong>UI</strong></td><td>ネイティブなWindows Installer UI。EPMインターフェースは追加されない</td></tr><tr><td><strong>サイレントモード</strong></td><td><code>--silent</code> または <code>KEEPER_INSTALL_LAUNCHER_SILENT=1</code> — stderrへの失敗サマリーのみ。終了コードは常にmsiexecの結果</td></tr><tr><td><strong>許可する拡張子</strong></td><td><code>elevation-allowed-extensions.json</code> で構成。<code>KEEPER_ELEVATION_EXTENSIONS_CONFIG</code> でパスを上書き</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.keeper.io/keeperpam/jp/endpoint-privilege-manager/custom-tooling/jobs-and-plugins/custom-plugin-guide/plugin-examples/plugin-install-launcher.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
