How do Installation Software Programs Extract Files?

自古美人都是妖i 提交于 2019-12-18 09:50:41

问题


I am working with installers at the moment, and the first thing I thought of was to put a .zip file on a server and then having it download that and extract. However, I've seen installers run without an internet connection (which wouldn't work for mine), and they say "extracting files", not downloading.

Is there some way to store files in an installer, and is there anything wrong with me having an installer like I currently do?


回答1:


The overview of a Windows Installer setup is that files are typically in a CAB file as an embedded resource, and the rest of the setup is a database that contains info about the files, and items I'm going to mention here:

What you not have mentioned about your installer is files that need to go into separate locations (GAC, Common Files, User's Application Data, ProgramFiles etc); data such as registry entries, service install/stop/start, COM registration; how to maintain and upgrade the installed files (the standard is that higher versions override lower versions, updated data files don't get overwritten). Of course there are more things I haven't mentioned (Add/Remove Programs?).

So if you have only a bunch of files (and nothing else) that all go to the same location, and you're not worried about updating it (having no rules about replacing the older files) then your plan might be sufficient for your needs.




回答2:


There are many types of installers, all supporting the extraction of files in the manner you speak of.

The current installation standard is MSI (Windows Installer). Here is an answer with information about Windows Installer and also other types of installers (see link on top - Non-MSI installer tools) How to create windows installer.

There is also ClickOnce - which is not my expertise, and Microsoft Visual Studio 2017 Installer Projects - a very limited form of MSI tool. Not recommended.

Inno Setup and NSIS seem to be popular, free non-MSI installers. Advanced Installer also has some free features in their mainstream tool.


  • Wrap C# application in .msi installer


来源:https://stackoverflow.com/questions/50775173/how-do-installation-software-programs-extract-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!