Hello there,
I am using Visual Studio Intaller. it creates a setup with an extension of .MSI. My question is how can i execute this using VB.
I tried the SHELL command with no Luck.
Pls help its urgent.
thanks.:confused:
Printable View
Hello there,
I am using Visual Studio Intaller. it creates a setup with an extension of .MSI. My question is how can i execute this using VB.
I tried the SHELL command with no Luck.
Pls help its urgent.
thanks.:confused:
First of all, I would stay away from using a .msi installer. It requires users that do not have the MSI installer program to download it, and that takes even more time. It is is much better to use a program like InnoSetup, which is free, and create setup files that way.
If you still want to use the MSI file, you can use the ShellExecute API to open the file:
VB Code:
'in the General Declares section of code 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 Private Const SW_SHOWNORMAL = 1 'to use ShellExecute hwnd, "open", "C:\MySetup.msi", vbNullString, vbNullString, SW_SHOWNORMAL