How do you install an app from the command line with an inf file?
Printable View
How do you install an app from the command line with an inf file?
Code:'in declarations
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'to use
ShellExecute hwnd, "Install", "C:\yourfile.inf", vbnullstring, vbnullstring, 0
I can use this too in another project THANKS! But to look a gift horse in the mouth, how can this be done from the run line or in a batch file?
C:\WINDOWS\rundll.exe setupx.dll,InstallHinfSection DefaultInstall 132 C:\Yourfile.inf
I just looked it up in registry, and thats the command line you use :)