如何创建EXE任何设置? [英] How to create setup for any exe?

查看:139
本文介绍了如何创建EXE任何设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我点网exe文件,我想创建一个安装本产品和任何登录后或重新启动此exe应该自动调用。

I have dot net exe, i want to create a setup for this and after any login or restart this exe should call automatically.

在此先感谢,
拉维奈克。

Thanks in advance, Ravi Naik.

推荐答案

当你正在部署.NET应用程序,也有在其中您可以处理这个挑战多种方式。

As you are deploying a .NET application, there are multiple ways in which you can approach this challenge.

有你有选择的安装策略时需要考虑很多问题。这些措施包括:

There are many questions you have to consider when choosing an installer strategy. These include:


  • 我如何计划分发此软件?

  • 是什么办法?

  • 应该被连接到互联网,软件什么的用户是有针对性的对?
  • $ B软件$ b
  • 请这些用户拥有特定的计算机安装,如已安装的所有具有.NET框架?

  • 我应该如何看待更新的问题软件?

  • How do I plan to distribute this software?
  • Is the software supposed to be connected to the internet in any way?
  • What users is the software targeted towards?
  • Do these users have specific computer installations, such as all having .NET Framework already installed?
  • How should I approach the problem of updates to the software?

回答一些问题后,你可以得到你应该如何分发软件的总体思路。然后,你需要考虑各种安装和维基百科有一个比较他们一个方便的列表。,这可能会帮助你。

After answering some of these questions, you can get a general idea of how you should distribute the software. Then, you need to consider the various installers, and Wikipedia has a convenient list that compares them, which might help you.

下面是什么可能为你工作的一些例子:

Below are some examples of what might work for you:


  • ClickOnce部署内置到Visual Studio - 我目前最喜欢的方式,因为这是最容易为用户和开发人员,因为更新和互动是非常简单

  • < A HREF =http://nsis.sourceforge.net/Main%5FPage相对=nofollow> NSIS 这样安装程序(Nullsoft脚本安装系统),一个开放源代码的脚本系统。在包装和检查与NSIS .NET Framework中一个伟大的教程可以在这里找到

  • 的InstallShield(Macrovision的) - 一个频繁使用的安装系统,但是这个人是不是免费的,不像其他的解决方案

  • DreamShield - 我还没有试过这一个,但这似乎是一个可行的解决方案。

  • 维克斯(与Visual Studio插件)

  • ClickOnce deployment built into Visual Studio - my current favorite way, as this is the most easiest for users and for developers because updates and interaction is extremely simple
  • NSIS (Nullsoft Scriptable Install System), an open source scripting system for such installers. A great tutorial on packaging and checking for the .NET Framework with NSIS can be found here.
  • InstallShield (from Macrovision) - a heavily used installer system, but this one is not free, unlike other solutions
  • DreamShield - I haven't tried this one, but it appears to be a viable solution.
  • WiX (with Visual Studio plugin)

应用程序部署是软件开发的一个非常艰难的部分,尤其是在.NET,因为我们怎么能知道,例如,无论是潜在用户已经安装了系统在.NET Framework或没有?或者有什么版本安装?因此,我们必须使用类似的ClickOnce和NSIS工具来帮助

Deployment of applications is a very tough part of software development, especially in .NET, because how can we know, for example, whether the potential user already has the .NET Framework installed on their system or not? Or what version is installed? Thus, we must use tools like ClickOnce and NSIS to help.

要您了解如何在登录立即启动应用程序的问题,有四种方法可以解决这个:

To your question about how to start your application immediately at login, there are four ways to approach this:


  • 添加注册表项,在登录/启动时启动 - MSDN解释说,很好的这里然而,大多数安装系统允许自动配置为启动另外的注册表项。

  • Add registry key to start at login/bootup - MSDN explains that very well here. However, most installation systems allow you to automatically configure the registry key for bootup addition.

使用Windows的任务计划程序安排一个任务,换句话说,要创建在启动时运行的任务。没有为这里的一个.NET库,我已经两个用它我的应用程序是在一个特定的时间表运行,它的伟大工程!

Use the Windows Task Scheduler to schedule a "task", in other words, to create a task that runs at startup. There is a .NET library for that here, I've used it in two of my applications that run on a specific schedule, it works great!

添加的路径可执行到位于启动文件夹中C:\Documents和Settings\All Users\Start Menu\Programs\Startup (即所有用户 - 针对单个用户可以自定义该路径的用户名)。顺便说一句,该位置是在Windows XP中,它可能会在Windows的其他版本不同。

Adding the path to your executable into the Startup folder located at C:\Documents and Settings\All Users\Start Menu\Programs\Startup(that is for all users - for single users you can customize the username in that path). By the way, that location is in Windows XP, it may be different in other version of Windows.

如果您的应用程序是一个Windows服务,你已经可以自动启动在启动时,通过svchost的!有一个简单的服务配置,让你做到这一点。

If your application is a Windows Service, you can already automatically start at bootup, through svchost! There is a simple service configuration that will allow you to accomplish this.

希望我帮助!

这篇关于如何创建EXE任何设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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