LoginSignup
1
4

More than 1 year has passed since last update.

Intune Win32アプリで対話型インストールを行う その2

Last updated at Posted at 2023-03-25

前回に引き続き、今度は海外ネットで一般的なServiceUIを利用した方法を試してみたいと思います。

Intuneを利用してアプリ配布を行う時に、Win32アプリを利用することが多いと思います。
残念ながらIntuneではサイレントインストールにしないとインストールができません。
すべてのアプリがサイレントインストールならばいいのですが、実際にはそういかない場合も多いと思います。
色々と調べてみると、海外のコミュニティでも同様のことで困っている人がいて、以下のような対応策が公開されています。

Use ServiceUI with Intune to Bring SYSTEM Process to Interactive Mode

この方法をいろいろなスクリプトなどで試してみたいと思います。

ServiceUIの入手方法

Microsoft MDTを入手して、インストールします。
インストール後、以下のフォルダにServiceUI.exeが保管されています。(x64の場合)
C:\Program Files\Microsoft Deployment Toolkit\Templates\Distribution\Tools\x64

ファイル構成

以下のように保管し、Intune形式のファイルを作成しておきます。
D:\Documents\Intune\Apptest04\Src

image.png

IntuneWin作成のコマンド
image.png

EXEの場合

前回の7zipを利用します。
Intune Win32 アプリ インストールコマンドの指定
explorerを実行しているセッションに画面を表示する ということのようです。

ServiceUI.exe -process:explorer.exe 7z1900-x64.exe

image.png

バッチファイル

inst.bat
@echo off
echo Test Batfile
pause
exit 0

Intune Win32 アプリ インストールコマンドの指定

ServiceUI.exe -process:explorer.exe inst.bat

image.png

VBSスクリプト

inst.vbs
Msgbox("Test!")

Intune Win32 アプリ インストールコマンドの指定
ServiceUIですが、パスを勘案しないようですので、コマンドによってはこのようにフルパス指定が必要のようです。

ServiceUI.exe -process:explorer.exe %SYSTEMROOT%\System32\wscript.exe inst.vbs

image.png

Powershellスクリプト

inst.ps1
Write-Host "Hello World!!"
[Console]::ReadKey() | Out-Null

Intune Win32 アプリ インストールコマンドの指定

ServiceUI.exe -process:explorer.exe  %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy RemoteSigned .\inst.ps1

image.png

最後に

やはりネットで情報が見つかるだけあって、こちらの方法が簡単ですね。
前回同様、そもそもこれをIntuneの機能でできないことが問題ですね、MSのFeedbackサイトにも投稿してみましたので、ご賛同いただける方は、投票をお願いいたします。

Ability to allow Win32 Application(System context) Interactive installation

Enjoy your Intune life!

1
4
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
4