我正在使用 Windows 10 N 周年更新,它没有像 WMP 这样的媒体臃肿软件。但是我希望我的 iPhone 可以通过文件资源管理器访问以复制照片。事实证明,您必须安装适用于 Windows 10 N 的媒体功能包(KB3133719)使其工作。
KB3133719-x64.msu.msu 文件本身只有大约 100 MB。但是,安装它时会占用约 500 MB 的空间,比安装常规 Windows 10 非 N 版占用的空间多 40 MB(是的,我必须安装几个虚拟机才能弄清楚)。
这绝对不合理,因为 KB3133719-x64.msu.msu 中包含的 MTP 设备驱动程序仅占用约 3 MB! 工作部分是 BK3133719 包安装是永久性的,您无法事后使用 DISM 将其从 N 系统中删除(试过了,Remove-Package 返回错误)。
我设法从 MSU 中提取 CAB,并从 CAB 中提取所需的驱动程序 INF 和 DLL。但是,当我尝试在设备管理器中将驱动程序应用到我的 iPhone 时(您必须使用 Shift-Restart > 故障排除 > 高级 > 启动设置来安装未签名的驱动程序,因为驱动程序签名是从提取的 CAB 继承的,根据 Microsoft 的说法,抱歉无法重新找到文章),向导说无法添加设备,因为缺少设备类。实际上,是的,Windows 10 N 中缺少设备类“便携式设备”。
所以我想知道是否有人可以帮助我 1)将“便携式设备”类手动添加到我的 Windows 10 系统中(我可以从 KB3133719 的 CAB 中获取所有 DLL)或 2)从 KB3133719-x64.msu.msu 内的 CAB 中获取 Windows-Portable-Device-Package 并使其仅安装驱动程序。
我已经尝试编辑 Media-Feature-Pack MUM(它位于 CAB 中,我删除了除 Windows-Portable-Device 之外的所有字符串行)并为其制作新的签名 CAT(使用 makecat.exe),然后重新打包并重新签名 CAB(是的,我将自定义生成的证书安装到 Trusted Publishers 和 Trusted root),感谢这本很棒的指南。但是,在将签名的 CAB 包安装到新的 10 N 虚拟机时,我收到错误(未找到文件)。当我对从提取的未修改文件生成的 CAB 进行签名时,一切都安装正常。因此,我认为在签名方面我做的一切都正确,但有些地方需要复查(可能参考 Windows-Portable-Device MUM 内的其他包),我无法弄清楚。
请帮忙!
以下是我正在做的事情:
Modifying Windows Update Package
via (link removed - not enough reputation points)
via (link removed - not enough reputation points)
1. Download Visual Studio Community 2015: (link removed - not enough reputation points)
Configure Visual Studio Community 2015 installation: check "Universal Windows App Development Tools > Tools (1.4.1) and Windows 10 SDK"
2. Unarchive (using WinRAR or expand command) KB3133719-x64.msu.msu > microsoft-windows-mediafeaturepack-oob-package-original.cab > microsoft-windows-mediafeaturepack-oob-package-original
3. Edit adn save using Notepad .\microsoft-windows-mediafeaturepack-oob-package-original\Microsoft-Windows-MediaFeaturePack-OOB-Package~31bf3856ad364e35~amd64~~10.0.14393.0.mum
to delete all update entries except:
- Microsoft-Media-Foundation-Package
- Microsoft-Media-Foundation-WOW64-Package
- Microsoft-Windows-Portable-Devices-Package
2. Run Command Prompt as Administator
cd "C:\Program Files (x86)\Windows Kits\8.1\bin\x64"
makecert -r -sv C:\Certificate.pvk -n CN="Generic Certificate" -eku 1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.6 C:\Certificate.cer
(Password - None)
Note (according to (link removed - not enough reputation points))
To find EKU, double-click any CAT from original CAB and View Signature > View Certificate > Details > Copy to File > Save as CER
Double-click CER > Details > Enchanced Key Usage contains numbers:
Code Signing (1.3.6.1.5.5.7.3.3)
Windows System Component Verification (1.3.6.1.4.1.311.10.3.6)
This determines a certificate is valid for Windows Update installations.
Otherwise DISM returns error:
0x800B0110 -2146762480 CERT_E_WRONG_USAGE The certificate is not valid for the requested usage
((link removed - not enough reputation points))
cert2spc C:\Certificate.cer C:\Certificate.spc
pvk2pfx -pvk C:\Certificate.pvk -spc C:\Certificate.spc -pfx C:\Certificate.pfx
3. Install Certificate.cer to Local Computer > Trusted Publishers and Trusted Root Certification Authorities Stores
4. Create CDF file using Notepad
# # # # # # # # # # # # # # # # # # # #
[CatalogHeader]
Name=Microsoft-Windows-MediaFeaturePack-OOB-Package~31bf3856ad364e35~amd64~~10.0.14393.0.cat
ResultDir=.\
PublicVersion=0x00000001
EncodingType=
[CatalogFiles]
<HASH>Microsoft-Windows-MediaFeaturePack-OOB-Package~31bf3856ad364e35~amd64~~10.0.14393.0=.\Microsoft-Windows-MediaFeaturePack-OOB-Package~31bf3856ad364e35~amd64~~10.0.14393.0.mum
# # # # # # # # # # # # # # # # # # # #
Copy CDF & MUM to "C:\Program Files (x86)\Windows Kits\8.1\bin\x64"
5. Continue to Command Prompt as Administator:
makecat Microsoft-Windows-MediaFeaturePack-OOB-Package~31bf3856ad364e35~amd64~~10.0.14393.0.cdf
signtool sign /f C:\Certificate.pfx /t http://timestamp.verisign.com/scripts/timstamp.dll /v "C:\Program Files (x86)\Windows Kits\8.1\bin\x64\Microsoft-Windows-MediaFeaturePack-OOB-Package~31bf3856ad364e35~amd64~~10.0.14393.0.cat"
Copy CAT to C:\Users\User\Downloads\KB3133719-x64.msu\microsoft-windows-mediafeaturepack-oob-package
6. Run Windows PowerShell & input script, press Enter
# # # # # # # # # # # # # # # # # # # #
function compress-directory([string]$dir, [string]$output)
{
$ddf = ".OPTION EXPLICIT
.Set CabinetNameTemplate=$output
.Set DiskDirectory1=.
.Set CompressionType=MSZIP
.Set Cabinet=on
.Set Compress=on
.Set CabinetFileCountThreshold=0
.Set FolderFileCountThreshold=0
.Set FolderSizeThreshold=0
.Set MaxCabinetSize=0
.Set MaxDiskFileCount=0
.Set MaxDiskSize=0
"
$dirfullname = (get-item $dir).fullname
$ddfpath = ($env:TEMP+"\temp.ddf")
$ddf += (ls -recurse $dir | ? {!$_.psiscontainer}|select -expand fullname|%{'"'+$_+'" "'+$_.SubString($dirfullname.length+1)+'"'}) -join "`r`n"
$ddf
$ddf | Out-File -encoding UTF8 $ddfpath
makecab /F $ddfpath
rm $ddfpath
rm setup.inf
rm setup.rpt
}
# # # # # # # # # # # # # # # # # # # #
7. Input PowerShell commands:
cd C:\Users\User\Downloads\KB3133719-x64.msu
compress-directory .\microsoft-windows-mediafeaturepack-oob-package .\microsoft-windows-mediafeaturepack-oob-package.cab
8. Continue to Command Prompt as Administator:
signtool sign /f C:\Certificate.pfx /t http://timestamp.verisign.com/scripts/timstamp.dll /v "C:\Users\User\Downloads\KB3133719-x64.msu\microsoft-windows-mediafeaturepack-oob-package.cab"
# # # # # # # # # # # # # # # # # # # #
Here's error I get when install signed CAB using DISM
Deployment Image Servicing and Management tool
Version: 10.0.14393.0
Image Version: 10.0.14393.0
Processing 1 of 1 - Adding package Microsoft-Windows-MediaFeaturePack-OOB-Package_Wrapper~31bf3856ad364e35~amd64~~10.0.14393.0
[==========================100.0%==========================]
An error occurred - Microsoft-Windows-MediaFeaturePack-OOB-Package_Wrapper Error: 0x80090352
Error: 0x80090352
DISM failed. No operation was performed.
For more information, review the log file.
# # # # # # # # # # # # # # # # # # # #
我根本没有找到有关错误 0x80090352 和 Windows 更新的信息。
PS 在 10 N 虚拟机中应用更新后,iPhone 可以从文件资源管理器中完美访问。因此,我不必担心因 Microsoft 臃肿软件而损失 500 MB 空间,因为我永远不会使用这些软件。
答案1
好的,我明白了,并在另一个论坛的自己的帖子中发布了回复,请随时查看如何立即部分卸载 Windows 10 N 的媒体功能包:https://www.tenforums.com/drivers-hardware/72798-media-transfer-protocol-device-mtp-device-support-windows-10-n.html#post895405