Jeremy Bunn
November 9th, 1998, 03:39 PM
Is there a way to use rundll32.exe to install an inf file? We need to get the vb 5 runtime installed without user intervention and without a special setup program. An inf file is working, but we need a way to be able to install it from the command line. Any help would be very appreciated. If you reply to my message, remove everything but colubs.com from my address.
Thanks! Jeremy
Nick Schipano
November 11th, 1998, 03:00 PM
From a command line program, I would think that you can call the ShellExecute function, using the proper action (i.e. "Install") as the lpOperation parameter and the path to the .INF file.
The VB Declaration is below:
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
VC++ prototype is below:
HINSTANCE ShellExecute( HWND hwnd, // handle to parent window
LPCTSTR lpOperation, // pointer to string that specifies operation to perform
LPCTSTR lpFile, // pointer to filename or folder name string
LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters
LPCTSTR lpDirectory, // pointer to string that specifies default directory
INT nShowCmd // whether file is shown when opened
);