Installing a driver(.inf) file from command line

后端 未结 3 447
野的像风
野的像风 2021-02-05 12:28

I am working in windows 8.1. I need to install a driver file(.inf file) from command line. Which command i need to use.? I know i have many other method for installing a .inf fi

3条回答
  •  臣服心动
    2021-02-05 12:54

    The default way for device drivers is:

    pnputil -i -a 
    

    Legacy Drivers can´t be installed with pnputil and have to use LaunchINFSectionEx-Call

    I tested the following and it works with several drivers from Windows 2000 up to Windows 10, 2012R2, 2016, 2019.

    rundll32.exe advpack.dll,LaunchINFSectionEx ykmd.inf,Yubico64_Install.NT,,4,N
    

    Pay attention to use the correct section

    The correct section of the inf-File must be used, when there is no [DefaultInstall]-Section. This lacks in most answers. Look it up in your drivers inf-File and use the correct section (in my example "Yubico64_Install.NT"). Using the wrong section wont prompt an error. Im my example I use Quiet mode, no UI (4) and Never reboot (N) to install the driver automated via GPO. All options are documented in detail here:

    https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa768006(v%3Dvs.85)

提交回复
热议问题