标签 DISM 下的文章

Win8 Win8.1离线安装.NET框架3.0

不知道什么原因,在Win8、Win8.1中,不管是在控制面板里面勾选.NET Framework 3.5,还是安装netfx35.exe都需要从微软官网获取安装文件,在网速慢得掉渣的公司显得很捉急。

不过有个好办法,可以离线安装.NET3,需要准备Windos 8安装光盘或者是iso文件即可。

插入光盘,或挂载好iso之后(假设挂载到D盘)

然后右击开始菜单(Win + X)的左下角,选择-命令提示符(管理员)

然后输入如下命令

dism.exe /online /enable-feature /featurename:NetFX3 /Source:D:\sources\sxs

命令成功完成后就安装好了。

DISM 您没有装载或修改此映像的权限。

执行:

C:>dism /mount-wim /wimfile:e:\winpe40.wim /index:1 /mountdir:e:\40

报错:

部署映像服务和管理工具 版本: 6.1.7600.16385

错误: 0xc1510111

您没有装载或修改此映像的权限。 请验证您是否有读/写权限,或者使用 /ReadOnly 选项装载此映像。注意,无法使用只读权限提交>对映像所做的更改。

可以在 C:\Windows\Logs\DISM\dism.log 上找到 DISM 日志文件

DISM错误日志:

WIM open failed with access denied. - CWimImageInfo::Mount(hr:0xc1510111)
d:\w7rtm\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:999 - CWimManager::InternalOpMount(hr:0xc1510111)
d:\w7rtm\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:2247 - CWimManager::InternalCmdMount(hr:0xc1510111)
Error executing command - CWimManager::InternalExecuteCmd(hr:0xc1510111)
d:\w7rtm\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:516 - CWimManager::ExecuteCmdLine(hr:0xc1510111)

解决

去掉WIM镜像文件的只读属性。

DISM add-package Error 0xc1420127

首先我使用dism把wim mount起来:

dism /mount-wim /wimfile:c:\pe40\media\sources\boot.wim /index:1 /mountdir:C:\pe40\mount

然后就因为其他原因重启动了系统。然后再执行:

dism /image:C:\pe40\mount /add-package /packagepath:"WinPE-WMI.cab"

就报错,错误号是0xc1420127。

解决方法是首先unmount这个wim文件。然后再重新mount。注意mount之后的操作请勿关机或重启。不然就会报错0xc1420127。

You try to mount your wim image and you get this error

Error: 0xc1420127: The specified image in the specified wim is already mounted for read/write access.

When unmount doesn’t work. Try this command: DISM /cleanup-wim

update 2013.03.28:最近使用imagex.exe也报这样的错误。问题原因是同一个wim被重复mount到不同的mount point。一个wim文件同一时间是不能mount到不同的挂载点的。

A failure occurred trying to determine the architecture of DISM in the image.CDISMManager::CreateImageSessionFromLocation(hr:0x801f0005)

I ran the following DISM command to add package for WinPE image:

dism /image:C:\pe40\mount /add-package /packagepath:"WinPE-WMI.cab"

But error occurred:

DISM Manager: PID=1484 TID=6280 A failure occurred trying to determine the architecture of DISM in the image. - CDISMManager::CreateImageSessionFromLocation(hr:0x801f0005)
DISM.EXE: Could not load the image session. HRESULT=801F0005

After google for several hours but in vain.

Finally I realized that I've installed the WimFltr drivers for Vista WAIK for several days. So I removed the file at c:\windows\inf\wimfltr.inf and c:\windows\system32\drivers\wimfltr.sys. And then I delete the registry item at HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\WimFltr. The last step, reboot computer.

Problem solved!

From this case, we can probably know that Wim Filter Driver for different OS cannot be co-existed. Like the WimFltr for Vista WAIK && WimMount for WinPE 4.0(Win8PE).

DISM add-package报错:[HRESULT = 0x80070005 - E_ACCESSDENIED]

最近在玩WinPE。给WinPE加入FeaturePack的时候报错了:

执行了

dism /image:C:\Mount /add-package /packagepath:"WinPE-NetFx4.cab"
2012-03-02 09:30:24, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/SOFTWARE
2012-03-02 09:30:24, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/SOFTWARE, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]
2012-03-02 09:30:24, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/SYSTEM
2012-03-02 09:30:24, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/SYSTEM, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]
2012-03-02 09:30:24, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/SECURITY
2012-03-02 09:30:24, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/SECURITY, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]
2012-03-02 09:30:24, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/SAM
2012-03-02 09:30:24, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/SAM, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]
2012-03-02 09:30:24, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/COMPONENTS
2012-03-02 09:30:24, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/COMPONENTS, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]
2012-03-02 09:30:24, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/DEFAULT
2012-03-02 09:30:24, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/DEFAULT, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]
2012-03-02 09:30:24, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Users/default/ntuser.dat
2012-03-02 09:30:24, Info                  CBS    Failed to unload offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Users/default/ntuser.dat, the client may still need it open. [HRESULT = 0x80070005 - E_ACCESSDENIED]
2012-03-02 09:30:24, Info                  CBS    Unloading offline registry hive: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/system32/smi/store/Machine/schema.dat

E_ACCESSDENIED从错误号来分析是权限不够。请从一下几点分析尝试解决。

1.确定cmd使用管理员权限运行。

2.关闭防病毒软件,移植的有McAfee会阻止DISM的操作。尝试临时关闭防病毒保护,或将DISM加入白名单。

3.确认FeaturePack(*.cab)包的文件名是否存在,拼写是否正确。我的问题就出在这个地方。把WinPE-WMI.cab写成了WinPE-WIM.cab,同样报错E_E_ACCESSDENIED。