Visual Studio 2017中应用程序的自定义安装程序 [英] Custom installer for application in Visual Studio 2017
问题描述
我需要为我的应用程序生成一个安装程序,但是首先我需要知道它是否已经安装在系统node.js,npm和其他应用程序上
I need to generate an installer for my application but first I need to know if it is already installed on the system node.js, npm and other applications
是否可以将node.js的安装包含在我的应用程序的安装中,并知道它是否已经安装?
Is it possible to include the installation of node.js within the installation of my application and to know if it is already installed?
我正在使用Visual Studio 2017和用于桌面应用程序的WPF项目
I'm using Visual Studio 2017 and a WPF project for desktop applications
已经安装了应用程序后,由于这个原因,我需要在控制台中执行npm命令,我需要先安装它们或验证它们是否正确安装
When the application is already installed I need to execute npm commands in the console for this reason I need to install them before or verify if they are installed correctly
感谢您的帮助.
推荐答案
更新:高级安装程序:
UPDATE: Advanced Installer:
How to install a NodeJS web app
. Really excellent videos IMHO.
尽力而为 :我对 Node.Js
不太了解,因此不应该回答.但是我也没有看到其他人回答这些问题.尽管经验不足,但让我尝试提出一些建议.
Best Effort: I don't know much about Node.Js
, and hence should not answer. But I haven't seen anyone else answering these questions either. Despite lacking experience, let me try to give a few suggestions.
Windows Installer :似乎有 an您可以用来部署Node.Js的MSI .并且有列出了一些替代方法. (本质上是巧克力和瓢).
Windows Installer: There seems to be an MSI you can use to deploy Node.Js. And there are some alternatives listed. (Essentially Chocolatey and Scoop).
注意事项 :我已经回答了一个与Node.Js MSI安装失败有关的更具体的部署问题:Node.js安装(Windows Installer)会在64位Windows 10上过早终止一个>.此问题可能会解决,也可能不会解决.
Heads-Up: I have answered a more specific deployment question relating to a failed installation of the Node.Js MSI earlier: Node.js installation (windows installer) terminates prematurely on windows 10 64-bit. This may or may not be fixed.
部署 :要在安装软件包之前部署必备的MSI,可以使用具有 bootstrapping
/ sequencing
/ downloading
-换句话说,以包装为 setup.exe
的给定顺序运行多个安装操作.或者,您可以调查巧克力方法.关于部署工具,我有点烦于编写这些工具具有和不具有的功能列表.我将为此提供一些答案:
Deployment: To deploy a prerequisite MSI before your own package installation, you can use a deployment tool
capable of bootstrapping
/ sequencing
/ downloading
- in other words to run several installation operations in a given sequence wrapped as a setup.exe
. Or you could investigate the Chocolatey approach. With regards to the deployment tools, I am a bit tired of writing up the list of capacities these tools have and don't have. I will link to a few flavors of answers for this:
主要嫌疑犯:
- Installshield套件项目-套件的屏幕截图项目.
- WiX刻录包-当心:链接过载.但是有一个"Hello Burn"示例. 官方WiX文档.
- 高级安装程序-前提条件视图-某些项目类型中可用视图的屏幕截图.
- Installshield Suite Projects - screenshot of Suite projects.
- WiX Burn Bundle - beware: link overload. But there is a "Hello Burn" example. Official WiX documentation.
- Advanced Installer - Prerequisites View - screenshot of view available in some project types.
以上工具之一应该能够完成这项工作.只有WiX Burn是免费和开放源代码.有时,使用商用工具可以节省很多时间.显然,尤其是如果您的公司已经拥有此类工具的许可证(可能需要几天的时间才能弄清楚).
One of the above tools should be able to do the job. Only WiX Burn is free and open source. Sometimes you can save a lot of time by going with a commercial tool. Obviously especially if your company already have a license for such a tool (which can be a days work to figure out).
免费工具 :在仅免费工具和WiX替代产品的领域中,有些人使用由7-Zip和WinRAR制作的自解压存档.此处介绍的工具:在一个安装程序中合并exe和msi文件.出于安全原因和链接中所述的其他原因,我不喜欢这样做.
Free Tools: In the realm of free-tools only and alternatives to WiX, some people use self-extracting archives made with 7-Zip and WinRAR and some other tools described here: Combine exe and msi file in one installer. I don't like this for security reasons and other reasons as explained in the link.
简单 :对于公司部署,通过您的部署系统(SCCM等)分发的简单批处理文件或一些自定义结构就足够了.甚至带有嵌入式批处理文件的zip也可以按顺序启动您的压缩安装程序.一切都取决于您的情况.我不会采用这种全球分销方式.
Simplicity: For corporate deployment a simple batch file or some custom construct distributed via your deployment system (SCCM, etc...) could suffice. Or even a zip with an embedded batch file to kick off your zipped installers in sequence could work. All depends on your scenario. I wouldn't roll with such an approach for global distribution.
这是我描述
某些链接 : Some Links: 这篇关于Visual Studio 2017中应用程序的自定义安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!