现在的位置: 首页Windows7>正文
Windows7系统探究之Windows7组件和winsxs文件对应
2011年09月07日 Windows7 评论数 2

Windows7系统探究

Windows7组件和winsxs文件对应

最近五月病又犯了,加上连续几天的失眠,那么就写这么一个东西随便糊弄糊弄。

今天要讲的是Windows7组件和winsxs当中的文件对应的问题。

一般来说,Windows7里的组件列表是直接用dism列出的,虽然说有install_wim_tweak这么一个工具,不过使用之后一旦禁用一个组件,所有的组件都会丢失,所以最好还是不用好。

事先说一句,本篇文章里所有的环境是在Windows7 sp1 x64 ultimate英文版里进行的,用x86的童鞋只要一一对应就好,我相信你们的理解能力。

如果用dism列不出组件列表,那在哪里看呢?就在C:WindowsservicingPackages里,打开这个文件夹,发现有好多好多的mum文件和cat文件。Cat就不用碰了,数字签名,128位不对称加密也没什么好看的。再看看这些mum文件的文件名,懂英文的童鞋应该可以将这些名称对应上各个组件的名字,譬如Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~amd64~~6.1.7601.17514.mum。注意在后缀前带en-US或者zh-CN此类的,是语言包,这次不作讨论

用记事本打开mum文件,是一个xml标准的文件。(当然UltraEdit更好)

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?Copyright (c) Microsoft Corporation. All rights reserved.?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v3" copyright="Copyright (c) Microsoft Corporation. All Rights Reserved." manifestVersion="1.0">

<assemblyIdentity buildType="release" language="neutral" name="Microsoft-Windows-MediaPlayer-Package" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" version="6.1.7601.17514" />

<package identifier="Windows Media Player" releaseType="Feature Pack">

<parent integrate="delegate">

<assemblyIdentity buildType="release" language="neutral" name="Microsoft-Windows-MediaPlayback-OC-Package" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" version="6.1.7601.17514" />

</parent>

<update description="Windows Media Player" displayName="Windows Media Player" name="WindowsMediaPlayer">

<customInformation SoftBlockLink="http://go.microsoft.com/fwlink?LinkID=140092" />

<applicable disposition="staged">

<detectUpdate>

<parent name="MediaPlayback" />

</detectUpdate>

</applicable>

<selectable disposition="staged">

<detectNone default="true" />

</selectable>

<component>

<assemblyIdentity buildType="release" language="neutral" name="Microsoft-Windows-MediaPlayer-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" version="6.1.7601.17514" versionScope="nonSxS" />

</component>

</update>

</package>
</assembly>

 

大概分析一下这个mum文件,前面<assemblyIdentity buildType="release" language="neutral" name="Microsoft-Windows-MediaPlayer-Package" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" version="6.1.7601.17514" />是说的此组件的名字啊,架构啊,哈希啊,版本号什么的,总之是强文件名啦。

<package identifier="Windows Media Player" releaseType="Feature Pack">识别名称和包类别,为功能包

<parent integrate="delegate">和</parent>之间定义的是父组件包,指的是组件包之间的依赖性。

<update description="Windows Media Player" displayName="Windows Media Player" name="WindowsMediaPlayer">和</update>之间定义的是安装此包的信息。

我们要注意的是<component>和</component>之间的信息,name="Microsoft-Windows-MediaPlayer-Deployment"这个是重点,对应了winsxs的内容哦~

找到Microsoft-Windows-MediaPlayer-Deployment这个神奇的名称之后,去C:WindowswinsxsManifests搜索这个文件名,在我这里得到了两个结果,分别是wow64_microsoft-windows-mediaplayer-deployment_31bf3856ad364e35_6.1.7601.17514_none_da51814c8ec3b4bf.manifest和amd64_microsoft-windows-mediaplayer-deployment_31bf3856ad364e35_6.1.7601.17514_none_cffcd6fa5a62f2c4.manifest用记事本打开amd64的那个,结果如下:

<?xml version="1.0" encoding="UTF-8"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v3" manifestVersion="1.0" copyright="Copyright (c) Microsoft Corporation. All Rights Reserved.">

<assemblyIdentity name="Microsoft-Windows-MediaPlayer-Deployment" version="6.1.7601.17514" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-MediaPlayer-Common" version="6.1.7600.16385" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-MediaPlayer-Deployment" version="6.1.7601.17514" processorArchitecture="wow64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-Media-Player" version="6.1.7601.17514" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-MediaPlayer-Shortcut" version="6.1.7600.16385" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-WindowsMediaPlayer-Adm" version="6.1.7600.16385" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-Media-Player-OC" version="6.1.7600.16385" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-MediaPlayer-MP3-Settings" version="6.1.7600.16385" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-Help-Hmeshare" version="6.1.7600.16385" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-Help-Library" version="6.1.7600.16385" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-Help-Playing" version="6.1.7600.16385" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-Help-Privacy" version="6.1.7600.16385" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-Help-Ripbsyn" version="6.1.7600.16385" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-Help-Artuimedia" version="6.1.7600.16385" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<dependency discoverable="no">

<dependentAssembly dependencyType="install">

<assemblyIdentity name="Microsoft-Windows-Help-DGloss" version="6.1.7600.16385" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />

</dependentAssembly>

</dependency>

<deployment xmlns="urn:schemas-microsoft-com:asm.v3" />

</assembly>

 

看到了一个个在<dependency discoverable="no">和</dependency>之间的assemblyIdentity,注意其中的name="(这里是一个个名称哦) "键,复制这些键,在winsxs里搜索,自然是可以找到各个功能包所对应的winsxs文件夹了。Wow64开头的那个是同理。如果童鞋们用的是x86,当然那个manifest就是x86打头咯。

嗯,就这么简单地讲完了。不过呢,这个方法有很大的问题,有许多包,在mum文件里的名称与在C:WindowswinsxsManifests中的并不同,注意这是因为强文件名name值太长,中间名用…代替了,所以是不能直接搜索,而是要根据这个长文件名规则来看了。这个规则微软木有公开我也对此很晕,虽然每次都能找到不过显然不大好。一个更好的方法是直接在C:WindowswinsxsManifests中搜索deployment,除了windows-deployment开头的文件不是组件包信息以外,其他都是组件包信息。

其实manifest文件是多样的,mum文件也是多样的,我这里只是举个例子,以后会一类一类的讲,上面提到的是最基本的功能组件包,而且也是相对简单的mediaplayer,好了,等我下次犯五月病吧。

 

本文地址:http://yuri-x.com/2011/09/windows7_mum_winsxs/转载请注明

目前有 2 条留言 其中:访客:2 条, 博主:0 条

  1. 感冒通 : 2011年09月07日22:09:03  -49楼 @回复 回复

    沙发

  2. lzw1211 : 2011年09月07日23:23:25  -48楼 @回复 回复

    受益良多啊,O(∩_∩)O~

给我留言

留言无头像?


×
腾讯微博