How to make a batch file which installs Network Driver automatically

I am making an installer using the NSIS tool.

It's first time that I use NSIS and batch file script, so there are many difficulties.

The most important issue to solve is that the network driver must be installed automatically when the installation is completed.

So my idea is making a batch file to install network driver, and execute it by NSIS script.

The manual installation process is in below picture:
enter image description here

So my question is: Is it possible to make this process by using batch script?
And if it is: How could I get to last process in batch file? is it registry or something?


Depending on the driver, you might be able to perform a .inf install:

Section
InitPluginsDir
SetOutPath $PluginsDir
File "mydriver*.*"

System::Call 'SETUPAPI::InstallHinfSection(p0,p0,ts,i0)' 'DefaultInstall 132 $PluginsDir\mydriver.inf'

SetOutPath $InstDir
SectionEnd

If you want to install a 64-bit driver with a 32-bit installer you might have to ExecWait '"$sysdir\..\sysnative\rundll32.exe" SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 $PluginsDir\mydriver.inf instead.