简体   繁体   中英

Launching an installer (setup.exe) within another installer, program will not appear on installed programs list

I've built an installer that launches another installer (in it's Commit phase) (the setup.exe and.msi files are placed in the 'BoardsControllerSetup' directory)

On my own, development system (running w7 professional), everything's dandy

Testing on another w7 machine, logged as a user with basic permissions (I'm pretty sure permissions are to blame), the 2nd application will not appear on the installed programs list (nor for the matter will it create it's icon on the desktop).

(Later-on I need to launch the 2nd application from within the first, and so I'd like to be able to get it's installation path from the registry I could always try to create a registry string with the installation path.. but now I'm actually curious on how to fix this directly).

Any and all help appreciated.

Shaun

        System.Diagnostics.Process cBoardsControllerSetupProcess = new System.Diagnostics.Process();
        startInfo = new System.Diagnostics.ProcessStartInfo();
        startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
        startInfo.WorkingDirectory = Path.Combine(sInstallDir, "BoardsControllerSetup");
        startInfo.FileName = "setup.exe";
        cBoardsControllerSetupProcess.StartInfo = startInfo;
        cBoardsControllerSetupProcess.Start();

Windows Installer doesn't support two MSI-based installations running at the same time. So most likely the second installer fails because the main installation is currently running. The fact that it worked on one machine was just a timing coincidence.

The only (non-deprecated) way to run another MSI-based installation from InstallExecuteSequence is to schedule it after InstallFinalize with the msidbCustomActionTypeAsync and msidbCustomActionTypeContinue flags. This way it will run after the main installation is finished.

Please note that the recommended approach for installing existing packages is to add them as prerequisites. Some commercial setup tools support feature-based prerequisites controlled by the MSI, but most setup tools allow only prerequisites handled by an EXE bootstrapper.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM