Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Another Visual Basic question?

Ok the following code works fine on .exe files.

If CheckBox10.Checked = "true" Then Process.Start("****\*****.exe")

But I have now changed some of the install packages into .MSI files. And the the Process.Start statement will not work on them. What is the correct statment to launch these .msi files?

Thanks for any assistance.

2 Answers

Relevance
  • ?
    Lv 7
    9 years ago
    Favorite Answer

    I assume you are making some sort of custom installer that installs various msi's.... Unfortunately you will find this to be a problem, to put it simply some MSI's don't expect to be running within another program and other MSI's do not like running sequentially without a reboot. You may think of this as an MSI wants total control of the PC its instaling software on and if its runnig within another program then it doesn't have exclusive control. You may also notice that MSI's trigger reboots and continue installing possibly rebooting additional times.

    To make a fully automated installer with 3rd party MSI's you would need to use the registry to store a progress point in a key and to use the RUN ONCE key in coordination with a system reboot to for each MSI entering and removing entries as needed and triggering reboots. Your installer program is placed in the the RUN key to start after the RUN ONCE program and it chacks a status stored in a registry entry. Eventually your installer program finishes running all of the various installers and it removes its entry in the RUN key.

    If you have a Standard or Pro versio of VB you can use Windows Installer XML (WIX) scripting to script an MSI install sequence. Problem is that WIX solve issues process sequential MSI's. At best such a script will detect what is installed as prequesites and trigger the start of an install for a missing prequisite. Problem is that a 3rd party installer just won't play nice with your custom installer. At best it will install the 3rd party software but trigger a reboot necessatating a restart of your installer program. If you happen to have all prequisites installed the script will progress through the detection of the other programs and pass to your program installer and will work as you expect installing your program.

    I must confess that when I was confronted with this very issue at work I took an other approach altogether and that was to simplify the automated one step WIX installer in favor of the User manually starting the various individual installation programs. Since these 3rd party programs only needed to be installed once and each program hadles its own updates it just wasn't worth the aggrevation for software that was to be used in house on a handful of machines.

    Dotnet, MSSQL server and Agilent IVI drivers were manually installed as part of a new machine configuration instead of tyring to include in my installer. An added benefit of this seperation was my program could then be easily deployed using click once as I no longer needed to use a cutom WIX installer. Click once publishing not only rduced the size and complexity of the setup but also made it very easy for the software to check for updates on the network. Ultimately once a new machine is configured properly and the software installed subsequent updates are propegated automatically to all of the target machines.

    Source(s): Been there, done that.
  • ?
    Lv 4
    5 years ago

    No, that would not be intricate in any respect. You must use Global variables in modules to try this. Store the expertise in arrays for max potency. With international variables, each varieties have the potential to jot down and browse from them.

Still have questions? Get your answers by asking now.