Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
266 views
in Technique[技术] by (71.8m points)

console - Custom installer for application in Visual Studio 2017

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

Is it possible to include the installation of node.js within the installation of my application and to know if it is already installed?

I'm using Visual Studio 2017 and a WPF project for desktop applications

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

I appreciate any help.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

UPDATE: Advanced Installer: How to install a NodeJS web app. Really excellent videos IMHO.


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: There seems to be an MSI you can use to deploy Node.Js. And there are some alternatives listed. (Essentially Chocolatey and Scoop).

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.

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:

Prime Suspects:

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).

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.

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.

And here are several other answers where I describe available deployment tools:


Some Links:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...