Windows 7 中的安装

发布于 2024-10-21 17:53:01 字数 479 浏览 3 评论 0原文

我必须迁移当前的软件安装才能安装在 Windows 7 中。

它是 Visual C++ 中的 MFC 应用程序。安装并不是极其复杂,但确实有一些复杂性。它必须检测之前是否安装了其他软件才能启动 msi 文件,如果没有,则让用户安装它。有一些合并模块和嵌套的 msi,一些自定义操作(在 dll、vbscript 等中)。我们的要求之一是非管理用户必须能够安装该软件。并且最好在安装启动后无需同意任何消息。

我认为现在的方式有点混乱,我不仅希望迁移,还希望进行重构以使事情变得更好。所以我想要一些建议、一个提供最佳实践的网站、一些书籍(最好是包含有关 Windows 7 中安装的具体信息的最新内容)。任何形式的帮助将不胜感激。

顺便说一句,我们现在正在使用InstallShield,但我不介意更换为更好的工具(如果有的话)。

有人用过 Visual Studio 2010 的 InstallShield LE 吗?值得一试吗?

谢谢,

哈维尔

I have to migrate our current software installation to be able to install in Windows 7.

It's a MFC application in Visual C++. The installation is not extremly complex but it does have some complexity. It has to detect if some other software is installed previously to launch the msi file and let the user install it if it's not. There is some merge modules and nested msi, some custom actions (in dlls, vbscript, etc.). And one of our requeriments is that a non-administrative user has to be able to install the software. And preferably without having to agree any message once the installation is launched.

I think that the way it is done right now is a bit of a mess and I would like not just migrating but making a refactoring to make things better. So I would like to have some recommendations, a website with best practices, some books (preferable something up-to-date with specific information about installations in Windows 7). Any kind of help will be appreciated.

By the way, we are using InstallShield right now but I wouldn't mind to change to a better tool if there is any.

has anyboy used InstallShield LE for Visual Studio 2010? It's worthy to give it a try?

Thanks,

Javier

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

┈┾☆殇 2024-10-28 17:53:01

NSIS 安装程序有很多功能,包括您提到的功能。

NSIS installer has plenty of features, including what you mentioned.

踏雪无痕 2024-10-28 17:53:01

我认为没有一本书只涉及 Windows 7 的安装。尽管有关于如何编写安装程序的文章。

最好从Microsoft 用户体验设置指南开始:

用户不喜欢安装软件,因此现代安装体验需要简单、高效且无问题。

如果你只做三件事......

  1. 使设置尽可能简单、轻量。请记住,用户并不喜欢设置,而是忍受它。仔细查看每个问题、选项、页面和路径,并删除对完成设置不必要的所有内容。
  2. 针对所有安装场景进行设计,包括无人值守安装、脚本化安装和卸载。为了实现高效的无人值守安装,请确保设置阶段之间有明确的分离。
  3. 设计您的安装程序,以便用户可以自行解决安装问题,同时还可以记录技术支持所需的信息,以防万一。请记住,设置是所有用户必须成功完成的一项任务。

首次体验指南,这是应用程序的第一次,也值得一读。
一篇较旧的文章重新设计应用程序的安装程序讨论了分离可执行文件和关于共享组件的每用户和每台计算机的数据等。


在您的情况下,由于安装程序需要检测并安装附加组件(如果丢失),因此最好使用安装引导程序。

您有两个选择:

  1. 使用引导程序提升,然后运行提升的完整设置。
  2. 仅当您需要安装附加组件(应用程序的先决条件)时才进行提升。

仅当您的应用程序可以由标准用户安装时(即每用户安装,而不是每台计算机所有用户),第二个选项才适用。在这种情况下,如果其他组件需要提升才能安装,并且至少其中一个组件未安装,则您将启动提升的进程来安装所有必备组件。完成后,您可以以标准用户身份继续安装应用程序。

重点是只显示一次 UAC 确认:如果每个先决条件都显示自己的 UAC 确认,那将非常烦人。

I don't think there's a book that deals with only installation for Windows 7. Although there are article on how to write Setup.

It's best to start with Microsoft User Experience Guidelines for Setup:

Users don't enjoy installing software, so modern setup experiences need to be simple, efficient, and problem-free.

If you do only three things...

  1. Make setup as simple and lightweight as possible. Remember that users don't enjoy setup, they endure it. Look carefully at every question, option, page, and path, and trim away everything that isn't essential to completing setup.
  2. Design for all setup scenarios, including unattended installations, scripted installations, and uninstall. For efficient unattended installations, make sure there is a clean separation between the setup phases.
  3. Design your setup program so that users can resolve setup problems on their own, but also log the information needed for technical support just in case. Keep in mind that setup is the one task that all users must complete successfully.

Guidelines for the First Experience, that is the first of an application, are also worth reading.
An older article Redesign Your Application's Installer talks about the separating executable files and data, both per-user and per-machine, about the shared components, etc.


In your case, since the setup needs to detect and install additional components if they're missing, it's better to use a setup bootstrapper.

You have two options:

  1. Elevate with the bootstrapper then run the complete setup elevated.
  2. Elevate only when you need to install the additional components, the prerequisites of your application.

The second option applies only when your application can be installed by standard users, i.e. per user installation as opposed to per machine or all users. In this case, if the additional components require elevation to install, and if at least one of them is not installed, you start an elevated process to install all the prerequisites. When it completes, you continue the installation of your application as the standard user.

The point is to show UAC confirmation only once: it would be really annoying if each of the prerequisites show their own UAC confirmation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文