Results 1 to 2 of 2

Thread: VS Installer

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Location
    Philippines
    Posts
    136

    VS Installer

    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.
    elbimbo

  2. #2
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    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:
    1. 'in the General Declares section of code
    2. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal _
    3. hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As _
    4. String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    5. Private Const SW_SHOWNORMAL = 1
    6.  
    7. 'to use
    8. ShellExecute hwnd, "open", "C:\MySetup.msi", vbNullString, vbNullString, SW_SHOWNORMAL
    <removed by admin>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width