Drivers normally comes with an installer application. Pointless to say, if the driver can be successful installed using the installer, then use it. This page adresses cases were running the installer doesn't work or the driver has no installer, i.e. for in house developed or specialized drivers.
The following instructions assumes that the driver comes with an *.inf file. Tests were done by installing an graphics driver for Windows XP under Windows 7, a usage that the *.msi installer didn't allowed.
The dpinst.exe is an easy solution for installing drivers from the command line. Installation can both be interactive (GUI) or silent. The dpinst.exe utility is found in the DIFx directory after installing the tools from Windows Driver Kit.
Interactive installation of graphics driver using dpinst.exe
Running pnputil.exe prior to dpinst.exe might be required if dpinst.exe reports that the device was not found. Somehow, pnputil.exe appears to "wake up" the device and make it visible. That sounds like a bug to me.
Heres an sample batch script for installing an graphics adapter driver:
@echo off pnputil.exe -i -a CX151724.inf dpinst.exe /q /f /c /sw
See output log from running dpinst.exe
Not all drivers can be installed using the above process, most notably network drivers. If you need to install an network driver (service, protocol or client), then the mindinst.exe installer might prove useful.