How can I programatically install INF file?

  • Thread starter Thread starter JH
  • Start date Start date
J

JH

I can install an 'INF' file by just right clicking and choosing the
'Install'
option. However, how can I do this programmatically in C# in visual
studio.NET?

Your help is greatly appreciated

Thanks
 
JH said:
I can install an 'INF' file by just right clicking and choosing the
'Install'
option. However, how can I do this programmatically in C# in visual
studio.NET?

The command that is issued on an XP machine when you right click on an inf
file and choose install is:

%SystemRoot%\System32\rundll32.exe setupapi,InstallHinfSection
DefaultInstall 132 %1

The final parameter there (%1) would be the full path to the INF file. More
info on InstallHinfSection can be found at
http://msdn.microsoft.com/library/en-us/setupapi/setup/installhinfsection.asp.
--
Tom Porterfield
MS-MVP MCE
http://support.telop.org

Please post all follow-ups to the newsgroup only.
 
Back
Top