WAIK: 离线安装Windows驱动程序

方法一:通过dism命令注入

1.挂载WIM镜像:

Dism /Mount-Wim /WimFile:install.wim /Index:2 /MountDir:mount

2.删除之前安装的驱动:

Dism /Image:mount /Remove-Driver /Driver:OEM1.inf /Driver:OEM2.inf ... /Driver:OEM99.inf

3.注入驱动

Dism /Image:mount /Add-Driver /Driver:C:\D /Recurse /ForceUnsigned

注意:
预安装Nvidia显卡驱动时出现如下错误:

D:\Drivers\NVIDIADisplay_S20\Display.Driver\NVLW.INF: Error - An error occurred. The driver package could not be installed. 

是因为文件没有解压造成的,可以通过expand命令解压:

mkdir expanded
expand NVIDIA\Display.Direvers\* expaned\

如果仍不能解决,可以查看日志:

<MountFolder>\Windows\inf\setupapi.offline.log

4.卸载镜像

Dism /Unmount-Wim /MountDir:C:\offline /Commit

方法二:通过$OEM$文件夹载入

sources目录下创建$OEM$\$$\Inf\D目录,将驱动程序放入该文件夹下即可。该方法仅在Windows第一次启动时有效,并且仅加载已连接到计算机上的设备驱动程序。安装完后,可以删除该文件夹。

方法三:通过网络路径安装

通过Windows System Image Manager添加“Credentials”节点

├─Microsoft-Windows-PnpCustomizationsNonWinPE 
│  ├─DevicePaths
│  │  └─PathAndCredentials 
│  │      └─Credentials

填写以下黑体中的信息:

<?xml version="1.0" ?>
<unattend xmlns="urn:schemas-microsoft-com:asm.v3" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
   <settings pass="offlineServicing">
      <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <DriverPaths>
            <PathAndCredentials wcm:keyValue="1">
               <Path>\\networkshare\share\drivers</Path>
               <Credentials>
                  <Domain>Fabrikam</Domain>
                  <Username>MyUserName</Username>
                  <Password>MyPassword</Password>
               </Credentials>
            </PathAndCredentials>
         </DriverPaths>
      </component>
   </settings>
</unattend>

References:

[1] Fully unattended win7 x64 install with integrated (not injected) unsigned drivers…
[2] Question about injecting drivers via DISM
[3] Limitations of $WinPeDriver$ when used in conjunction with other driver injection methods
[4] Add Drivers to an Offline Windows Image by Using an Unattended Answer File

版权声明 » WAIK: 离线安装Windows驱动程序

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值