安装后运行应用程序。 [英] Run an application after Install.

查看:97
本文介绍了安装后运行应用程序。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经创建了一个安装项目并添加了一个Installer类来执行我的自定义Action。
当安装结束时我想运行我的应用程序:

为此,我使用方法Process.Start

public override void Commit(IDictionary savedState){
base.Commit(savedState);
string DirMain = System.Windows.Forms.Application.UserAppDataPath ;
DirMain = DirMain +" Hip \\ Hip.exe" ;;
System.Diagnostics.Process.Start(DirMain);



当我在一个正常运行的管理Windows帐户中,但当我与一个没有权限的用户时,我已经JIT的错误消息:

" JIT调试失败,出现以下错误:访问是
被拒绝。"

我在msdn中搜索,解决方法是将用户添加到Debugger Users组。


http://msdn.microsoft。 COM /库/ Default.asp的?URL = /库/ EN-US / vsdebug / HTML / vxtskErrorJITDebuggingFailedWithFollowingErr orAccessIsDenied.asp


我想知道安装完成后是否有其他方法可以运行我的应用程序?

可能在属性msi中有一个安装后激活以运行应用程序的选项?

感谢您的帮助。

Anton







< br>

解决方案

Windows安装程序可以直接启动exe,因此不需要安装程序类。但是我认为Visual Studio不会公开这个MSI功能。但是htere是一个可用于后处理内置.msi设置的工具。您可以从 http://下载它www.cornerhouse.ca/en/msilaunch.html

Hi,

I've  created a setup project and add an Installer class to do my custom Action.
When the installation is end i want to run my application :

To do that I use the method Process.Start

public override void Commit(IDictionary savedState) {
            base.Commit (savedState);
            string DirMain= System.Windows.Forms.Application.UserAppDataPath;
            DirMain = DirMain+"Hip\\Hip.exe";           
            System.Diagnostics.Process.Start(DirMain);
}

When I'm in a administrative windows account that run correctly but when i'm with a user with no privileges i've an error message of the JIT :

" JIT Debugging failed with the following error: Access is denied."

I search in the msdn and the solution is to add the user to the Debugger Users group.


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtskErrorJITDebuggingFailedWithFollowingErrorAccessIsDenied.asp


I would like to know if there is an other way to do run my application when the install is finished?

Maybe in the property msi there is an option to activate to run the application after install ?

Thanks for your Help.

Anton




解决方案

Windows Installer can directly launch an exe, there's no need for an installer class for this purpose. However I think this MSI functionality is not exposed by Visual Studio. But htere's a tool you can use to post-process your built .msi setup. You can download it from http://www.cornerhouse.ca/en/msilaunch.html


这篇关于安装后运行应用程序。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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