Windows 11 23H2から24H2へアップグレードしようとすると、「Microsoft XPS Document Writer v4」が原因で失敗します。
SetupDiagを実行すると、ScanResult.xml
に以下の行が出力されます。
<MatchingInfo><Driver><DeviceDesc>Microsoft XPS Document Writer v4</DeviceDesc><InstallName>oem5.inf</InstallName><InstallType>1</InstallType><Manufacturer>Microsoft</Manufacturer><Provider>Microsoft</Provider><Architecture>amd64</Architecture><HardwareId>{0F4130DD-19C7-7ab6-99A1-980F03B2EE4E}</HardwareId><ClassGuid>{4D36E979-E325-11CE-BFC1-08002BE10318}</ClassGuid><InfPath>C:\Windows\System32\DriverStore\FileRepository\prnms001.inf_amd64_cf4b76d3d4b6330c\prnms001.inf</InfPath><Problem>0x0</Problem><Status>0x0</Status></Driver></MatchingInfo>
これはGet-WindowsDriver
コマンドで確認したところ、「Microsoft XPS Document Writer v4」に該当します。
C:\>Get-WindowsDriver -Online -Driver oem5.inf
Driver : oem5.inf
OriginalFileName : C:\Windows\System32\DriverStore\FileRepository\prnms001.inf_amd64_cf4b76d3d4b6330c\prnms001.inf
Inbox : False
ClassName : Printer
ProviderName : Microsoft
Date : 2006/06/21 0:00:00
Version : 10.0.22621.1
HardwareDescription : Microsoft XPS Document Writer v4
Windowsの機能からXPSおよびPDF関連のプリンター機能はすべて無効にしています。
C:\>Get-WindowsOptionalFeature -Online -FeatureName *print*
FeatureName : Printing-PrintToPDFServices-Features
State : Disabled
FeatureName : Printing-XPSServices-Features
State : Disabled
FeatureName : Printing-Foundation-Features
State : Disabled
... (他もすべてDisabled)
しかし、pnputil
を使ってドライバーを削除しようとすると、デバイスが使用中であるため失敗します。
C:\>pnputil /delete-driver oem5.inf /uninstall /force
Microsoft PnP ユーティリティ
ドライバー パッケージはアンインストールされました。
ドライバー パッケージの削除に失敗しました: 指定された INF を使用して、現在 1 つ以上のデバイスがインストールされています。
この失敗はSetupDiagのログでも報告されています。
>>> [Driver Uninstall (DrvSetupUninstallDriver) - oem5.inf]
>>> Section start 2024/07/19 16:05:55.716
cmd: "C:\Windows\system32\pnputil.exe" /delete-driver oem5.inf /uninstall /force
! utl: INF 'oem5.inf' is still in use by system.
!!! dvs: Failed to uninstall driver packages. Error = 0xE000023D
<<< [Exit status: FAILURE(0xe000023d)]
このドライバーを使用しているプロセスを特定し、無効にするにはどうすればよいでしょうか?