简体   繁体   中英

Launching an exe at the end of a Visual Studio Setup Project of a c++ Project

The only useful resource that describes how to launch an exe after the Visual Sutio Setup Project is finished is: https://www.codeproject.com/Articles/19560/Launching-Your-Application-After-Install-using-Vis .

However, my project is written in c++ and I don't see how I can integrate the InstallerClass.cs which is ac# class.

The reason I know it is not being automatically integrated into the install is because I get the error: "There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected."

I suggest that you could use InstallShield to realize the automatic operation of the program after installation.

The method of implementation is: In the OnEnd() function of the InstallScript script, call the executable program.

Note: The INSTALLDIR predefined variable stores the installation directory of the program.

You could refer to the following example.

//Run dispatcher after installation
strPath=INSTALLDIR+"dispatcher";
strName="Frs.exe";
FindFile(strPath,strName,strResult);
if(strResult!="") then
    strPath=strPath+"\\"+strName;
    LaunchAppAndWait(strPath,"",NOWAIT);
endif;

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