<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[gOxiA=苏繁=SuFan Blog]]></title> 
<link>https://maytide.net/index.php</link> 
<description><![CDATA[gOxiA,苏繁,sufan,Microsoft MVP]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[gOxiA=苏繁=SuFan Blog]]></copyright>
<item>
<link>https://maytide.net/read.php/1835.htm</link>
<title><![CDATA[HOWTO: 使用预配置包为 Windows 10 设置默认应用关联]]></title> 
<author>gOxiA &lt;sufan_cn@msn.com&gt;</author>
<category><![CDATA[Windows Client]]></category>
<pubDate>Fri, 12 May 2017 03:35:48 +0000</pubDate> 
<guid>https://maytide.net/read.php/1835.htm</guid> 
<description>
<![CDATA[ 
	<p><strong><a href="http://goxia.maytide.net/ftpup/2017/Windows-10--MBR-to-UEFI-_89BE/win10creatorsupdate1703.png"><img title="win10creatorsupdate1703" border="0" alt="win10creatorsupdate1703" src="http://goxia.maytide.net/ftpup/2017/Windows-10--MBR-to-UEFI-_89BE/win10creatorsupdate1703_thumb.png" width="454" height="257"></a></strong></p> <p>HOWTO: 使用预配置包为 Windows 10 设置默认应用关联</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;前段时间 <a href="http://goxia.maytide.net" target="_blank">gOxiA</a> 与大家分享了一篇“<a href="http://goxia.maytide.net/read.php/1831.htm" target="_blank">HOWTO: 统一设置 Windows 10 的文件默认关联</a>”的文章，文末提到可以使用 WICD 生成配置包供 Windows 10 用户使用。其中截图里的设置方式有误，gOxiA 表示由衷的歉意，实在对不住大家了！！！也为此，决定单独写一篇文章再与大家详细分享一下 WICD 制作默认应用关联预配置包的过程，希望能够将功补过！</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;要使用 ICD 通过预配置包来设置 Windows 10 的默认应用关联需要使用 <a href="https://msdn.microsoft.com/windows/hardware/commercialize/customize/mdm/policy-configuration-service-provider" target="_blank">Poilcy CSP</a> ，借助 <strong><font style="background-color: #ffff00">ApplicationDefaults/DefaultAssociationsConfiguration</font></strong> 进行预配置。但是该项的值需要使用 Base64 编码来填充，之前截图环境的服务器不能访问外网，也没有留意上一级的说明，导致犯下错误！DefaultAssociationsConfiguration 的说明如下：</p> <p><em><font style="background-color: #ffff00" color="#a5a5a5">DefaultAssociationsConfiguration<br/>This setting specifies the XML file content (base64 encoded) thar contains file type and protocol default application associations. This file can be created using the DISM tool.</font></em></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gOxiA 之前的错误也正是因为这个原因！我们需要将导出的默认应用关联文件 defaultappassoc.xml 内容借助 Base64 encoder 工具编码后再填写到配置中。例如配置IE为默认应用的 XML 内容如下：</p> <p><font color="#a5a5a5"><em>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br/>&lt;DefaultAssociations&gt;<br/>&nbsp;&nbsp;&lt;Association Identifier=".htm" ProgId="htmlfile" ApplicationName="Internet Explorer" /&gt;<br/>&nbsp;&nbsp;&lt;Association Identifier=".html" ProgId="htmlfile" ApplicationName="Internet Explorer" /&gt;<br/>&nbsp;&nbsp;&lt;Association Identifier=".url" ProgId="IE.AssocFile.URL" ApplicationName="Internet 浏览器" /&gt;<br/>&nbsp;&nbsp;&lt;Association Identifier=".website" ProgId="IE.AssocFile.WEBSITE" ApplicationName="Internet Explorer" /&gt;<br/>&nbsp;&nbsp;&lt;Association Identifier="http" ProgId="IE.HTTP" ApplicationName="Internet Explorer" /&gt;<br/>&nbsp;&nbsp;&lt;Association Identifier="https" ProgId="IE.HTTPS" ApplicationName="Internet Explorer" /&gt;<br/>&lt;/DefaultAssociations&gt;</em></font></p> <p><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在使用 Base64 encoder 编码后得到的值则如下示例，在这里推荐个网站真的很不错<a title="http://www.ofmonkey.com/" href="http://www.ofmonkey.com/">http://www.ofmonkey.com/</a></font></p> <p><em><font color="#a5a5a5">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPERlZmF1bHRBc3<br/>NvY2lhdGlvbnM+CiAgPEFzc29jaWF0aW9uIElkZW50aWZpZXI9Ii5odG0iIFByb2dJZD0iaHRtbGZp<br/>bGUiIEFwcGxpY2F0aW9uTmFtZT0iSW50ZXJuZXQgRXhwbG9yZXIiIC8+CiAgPEFzc29jaWF0aW9<br/>uIElkZW50aWZpZXI9Ii5odG1sIiBQcm9nSWQ9Imh0bWxmaWxlIiBBcHBsaWNhdGlvbk5hbWU9Ikl<br/>udGVybmV0IEV4cGxvcmVyIiAvPgogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIudXJsIiBQcm9nS<br/>WQ9IklFLkFzc29jRmlsZS5VUkwiIEFwcGxpY2F0aW9uTmFtZT0iSW50ZXJuZXQg5rWP6KeI5ZmoIi<br/>AvPgogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSIud2Vic2l0ZSIgUHJvZ0lkPSJJRS5Bc3NvY0Zpb<br/>GUuV0VCU0lURSIgQXBwbGljYXRpb25OYW1lPSJJbnRlcm5ldCBFeHBsb3JlciIgLz4KICA8QXNzb2N<br/>pYXRpb24gSWRlbnRpZmllcj0iaHR0cCIgUHJvZ0lkPSJJRS5IVFRQIiBBcHBsaWNhdGlvbk5hbWU9I<br/>kludGVybmV0IEV4cGxvcmVyIiAvPgogIDxBc3NvY2lhdGlvbiBJZGVudGlmaWVyPSJodHRwcyIgUH<br/>JvZ0lkPSJJRS5IVFRQUyIgQXBwbGljYXRpb25OYW1lPSJJbnRlcm5ldCBFeHBsb3JlciIgLz4KPC9EZ<br/>WZhdWx0QXNzb2NpYXRpb25zPg==</font></em></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;下面就跟随 gOxiA 参考截图实践一次，首先启动 Windows 配置设计器（WICD，貌似现在叫 Windows Configuration Designer，这里姑且简称 ICD），友情提示该工具已经提供 UWP 版，可以直接从 Windows 应用商店安装，访问地址是：<a title="https://www.microsoft.com/store/apps/9nblggh4tx22" href="https://www.microsoft.com/store/apps/9nblggh4tx22">https://www.microsoft.com/store/apps/9nblggh4tx22</a>。</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在 ICD 起始页选择“高级预配”，并确认为“预配桌面设备”，输入个便于识别的名称，默认情况下 ICD 预配相关文件存储在文档的 WICD 目录下。</p> <p><a href="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/1.png"><img title="1" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="1" src="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/1_thumb.png" width="604" height="355"></a></p> <p><a href="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/2.png"><img title="2" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="2" src="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/2_thumb.png" width="604" height="355"></a></p> <p><a href="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/3.png"><img title="3" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="3" src="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/3_thumb.png" width="604" height="355"></a></p> <p><a href="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/4.png"><img title="4" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="4" src="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/4_thumb.png" width="604" height="355"></a></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在“可用自定义项”列表中定位到<strong><font style="background-color: #ffff00"> Polices &#124; ApplicationDefaults &#124; DefaultAssociationsConfiguration</font></strong>，将之前通过 Base64 encoder 取得的数据填写到数值框中。</p> <p><a href="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/5.png"><img title="5" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="5" src="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/5_thumb.png" width="604" height="340"></a></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最后通过工具导航栏导出预配包，在“描述预配包”步骤中，版本号会根据修改次数自动添加，所有者可以根据要实施的优先级别进行选择，等级保持 0 即可，如果预配包包含敏感数据应当对其进行加密，最后将生成的 ppkg 格式文件发给用户执行即可。如果预配包安装时发生错误，可以在事件查看器的“应用和服务日志”-“Microsoft”-“Windows”-“DeviceManagement-Enterprise-Diagnostics-Provider”-“Admin”下找到记录。</p> <p><a href="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/6.png"><img title="6" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="6" src="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/6_thumb.png" width="604" height="340"></a></p> <p><a href="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/7.png"><img title="7" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="7" src="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/7_thumb.png" width="604" height="374"></a></p> <p><a href="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/8.png"><img title="8" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="8" src="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/8_thumb.png" width="604" height="374"></a></p> <p><a href="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/9.png"><img title="9" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="9" src="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/9_thumb.png" width="604" height="350"></a></p> <p><a href="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/10.png"><img title="10" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="10" src="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/10_thumb.png" width="604" height="350"></a></p> <p><a href="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/11.png"><img title="11" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="11" src="http://goxia.maytide.net/ftpup/2017/HOWTO-zhi_98A6/11_thumb.png" width="604" height="350"></a></p>
]]>
</description>
</item>
</channel>
</rss>