如何为Windows创建一个健壮的,最小的安装程序? [英] How to create a robust, minimal installer for Windows?

查看:87
本文介绍了如何为Windows创建一个健壮的,最小的安装程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建具有某些特定属性的安装程序EXE:

I want to create an installer EXE with some specific properties:

  1. 它应该是单个exe文件
  2. 它应该很健壮(即该技术应该在任何Windows系统上都能很好地工作)
  3. 它应该在%systemroot%中仅创建一个文件(.scn屏幕保护程序文件)
  4. 它应该在控制面板->添加或删除程序"中添加用于卸载该特定文件的选项,但不要创建任何新条目C:\Program Files或在某处复制uninstaller.exe.
  1. it should be a single exe file
  2. it should be robust (i.e. the technique should be known to work well on any Windows system)
  3. it should create only a single file (a .scn screensaver file) in %systemroot%
  4. it should add the option to uninstall that particular file in "Control Panel -> Add or Remove Programs" but without creating any new entry C:\Program Files or copying an uninstaller.exe somewhere.

我已经看到安装程序可以那样工作-那么该怎么做?

I've seen installers that work like that - so how to do this?

推荐答案

正如您所说的,它可以是MSI,我建议您沿着那条路线走.

As you've said it can be an MSI, I'd suggest going down that route.

您可以在Visual Studio中处理安装程序项目(如果有的话;我不确定Express版本是否支持制作安装程序),因为它们会很高兴地产生一个MSI,该MSI可以满足您的要求.值得注意的是,它们将产生一个EXE和一个MSI,尽管您只需要分发MSI.

You could play around with installer projects in Visual Studio (if you have it; I'm not sure if the Express editions support making installers), as they'll quite happily produce an MSI that will do what you're asking. It's worth noting they'll produce an EXE and an MSI, you only need to distribute the MSI though.

如果失败,请查看 Windows Installer XML(WiX),因为这样您就可以手工雕刻MSI可以完全满足您的要求,并且可以满足上述所有五个要点.

Failing that, take a look at Windows Installer XML (WiX) as that will let you hand sculpt an MSI that does exactly what you want it to do and will cater for all five of your points above.

注意:使用MSI意味着您需要在要安装到的计算机上安装Windows Installer-它是Windows 2000/ME或更高版本的内置邮件.

Note: Using an MSI will mean that you'll need to have Windows Installer on the machine you're installing to - It's in-box from Windows 2000/ME upwards.

这篇关于如何为Windows创建一个健壮的,最小的安装程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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