Visual Studio安装>如何在安装完应用程序启动 [英] Visual Studio Installer > How To Launch App at End of Installer

查看:485
本文介绍了Visual Studio安装>如何在安装完应用程序启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个愚蠢的问题,我的谷歌搜索只是今天没有发挥作用。

This is probably a stupid question and my Googling just is not functioning today.

我有我添加了一个Visual Studio安装>安装向导项目的应用程序。我想知道如何添加一个按钮或复选框后安装成功,将启动该应用程序。这将设MSI安装包的最后一页上。我使用Visual Studio 2010旗舰版。

I have an application I added a Visual Studio Installer > Setup Wizard project to. I am wondering how to add a button or check box that would launch the application after successful install. This would be located on the last page of the MSI Installer Package. I am using Visual Studio 2010 Ultimate.

我需要这个,这样,当应用程序是否自动更新,它自动启动安装程序。我只需要安装更新后重新发起应用程序。

I am needing this so that when the application does an automatic update, it auto launches the installer. I just need the installer to relaunch the app after the update.

这可能是很简单,但对我的生活,我不能弄明白。在此先感谢您的帮助。

This is probably very simple but for the life of me I cannot figure it out. Thanks in advance for you help.

推荐答案

要运行任何应用程序安装完成后您的安装项目,单击鼠标右键,单击自定义操作。 ON COMMIT然后右键单击,添加自定义操作,并选择您想运行该文件。请注意,它必须是在已有的应用程序文件夹,因为你是无论如何运行您的程序应该不会在你的情况有问题。只需选择你的项目的输出。

To run any application after the installation is complete, right-click on your setup project, click on Custom Actions. Then right-click on Commit, Add Custom Action, and choose the file you would like to run. Note that it has to be in your application folder already, which shouldn't be a problem in your case since you are running your program anyway. Simply choose the output of your project.

然后,点击这个添加的.exe和改变InstallerClass为false。这是至关重要的,因为它会寻找否则安装程序。

Then, click on this added .exe, and change InstallerClass to false. This is crucial because it will look for an installer program otherwise.

您甚至可以将它们添加到Arguments属性参数传递给您的.exe

You could even pass parameters to your .exe by adding them to the Arguments property

这篇关于Visual Studio安装>如何在安装完应用程序启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆