在安装程序开始之前运行一个可执行文件 [英] Run an Executable file before Setup starts

查看:135
本文介绍了在安装程序开始之前运行一个可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个winform应用程序,我想为其创建安装程序.我的应用程序需要一个exe文件安装在计算机中,以便它可以正常工作.所以我想在我的应用程序安装开始之前安装该exe文件.我已使用Installer Class,但安装完成后它将运行exe文件.

i have a winform application and i want to create setup for it.my application need an exe file to install in machine in order to it can work correctly. so i want to install that exe file before my application setup starts.i have used Installer Class but it runs the exe file after the setup has finished. how can i do that?

推荐答案

可能您不能-当然也不可靠.
.NET应用程序需要.NET框架,该框架会经过检查,并在必要时通过安装程序包进行安装.如果未安装,则您的应用程序无法运行.因此,您需要先运行安装程序.

但是,您可以在设置过程中运行您的应用程序(注册组件说),该过程将在安装完成之前运行.这里有相应的说明: http://msdn.microsoft.com/zh-我们/library/d9k65z2d(VS.80).aspx [
Probably you can''t - and certainly not reliably.
.NET applications need the .NET framework, which is checked and if necessary installed by the installer package. If it is not installed, then your application cannot run. So you need to run the installer first.

However, you could run your application as part of the setup process - a registration component say - which runs before the setup is complete. There are instructions for that here: http://msdn.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx[^]


这篇关于在安装程序开始之前运行一个可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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