How do I Shell() Windows Installer (.msi file) from Visual basic
Posted on 2003-03-09
I'm trying to Shell a custom MSI file from within Visual Basic but it seems to result in an error, the code I've tried includes the basic:
Shell(App.Path & "\Customer.MSI")
and the ShellExecute Function:
Public Sub RunShellExecute(sTopic As String, _
sFile As Variant, _
sParams As Variant, _
sDirectory As Variant, _
nShowCmd As Long)
Dim hWndDesk As Long
Dim success As Long
hWndDesk = GetDesktopWindow()
success = ShellExecute(hWndDesk, sTopic, sFile, sParams, sDirectory, nShowCmd)
Although both methods work with standard .EXE files, neither seems to work with a .MSI file.
Any thoughts would be greatly appreciated!