You can find the command while browsing the registry key HKCR\inffile\shell\Install\command . In Windows XP, this
% SystemRoot% \ System32 \ rundll32.exe setupapi, InstallHinfSection DefaultInstall 132% 1
in Windows Vista and later it will be
% SystemRoot% \ System32 \ InfDefaultInstall.exe "% 1"
To use the batch file in several versions of Windows, you will need several tricksters. You can use reg.exe to request a key and try parsing the output (I did not find a quick way to get only the value from reg ). If you know which platforms you use, you can also hardcode the command lines and switch according to the version of Windows (it will take a different hack to figure this out. %OS% does not tell you more than "Windows NT", unfortunately .).
source share