简体   繁体   English

安装软件程序如何提取文件?

[英]How do Installation Software Programs Extract Files?

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. 目前,我正在与安装程序一起工作,我想到的第一件事是将.zip文件放在服务器上,然后将其下载并解压缩。 However, I've seen installers run without an internet connection (which wouldn't work for mine), and they say "extracting files", not downloading. 但是,我看到安装程序在没有Internet连接的情况下运行(这对我的用户不起作用),他们说“正在提取文件”,而不是下载文件。

Is there some way to store files in an installer, and is there anything wrong with me having an installer like I currently do? 有什么方法可以将文件存储在安装程序中,而像我目前这样安装程序有什么问题吗?

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: Windows Installer安装程序的概述是,文件通常作为嵌入式资源位于CAB文件中,其余的安装程序是一个数据库,其中包含有关文件以及我将在此处提及的项目的信息:

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); 关于安装程序,您没有提到的是需要放在单独位置的文件(GAC,通用文件,用户的应用程序数据,ProgramFiles等); data such as registry entries, service install/stop/start, COM registration; 注册表项,服务安装/停止/启动,COM注册等数据; 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. 因此,如果您只有一堆文件(没有其他文件)都存放在同一位置,并且您不担心更新它(没有替换旧文件的规则),那么您的计划可能就足以满足您的需求。

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). 当前的安装标准是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 . 这是有关Windows Installer以及其他类型的安装程序的信息的答案(请参阅非MSI安装程序工具顶部的链接) 如何创建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. 还有ClickOnce (这不是我的专长)和Microsoft Visual Studio 2017安装程序项目 (一种非常有限的MSI工具形式)。 Not recommended. 不建议。

Inno Setup and NSIS seem to be popular, free non-MSI installers. Inno SetupNSIS似乎是流行的免费非MSI安装程序。 Advanced Installer also has some free features in their mainstream tool . Advanced Installer在其主流工具中还具有一些免费功能


声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在软件安装期间生成数据库后端? - How to genenerate Database backend during Software installation? 创建一个只能由我的程序使用的文件。 我如何区别于其他程序的文件? - Creating a file that can be only used by my program. How do I differ it from other programs' files? 如何使用方便的程序打开附件? - How to make the attached files opened with their convenient programs? 程序如何处理“用...打开”的文件? - How do programs handle file “opened with…” them? 如何以编程方式访问操作系统中最常用的程序和程序的最新文件? - How to access most frequently used programs in OS and most recent files of programs programmatically? 如何检测软件键盘是否可见 - How do I detect if software keyboard is visible 如何删除在其他程序中仍处于打开状态的临时文件? - How can I delete temporary files that are still open in other programs? 安装后如何访问文件的权限? - How to access permission to files after installation? 如何重新编译 C# 程序以在 ARM CPU 上运行? - How do I recompile C# programs to run on ARM CPUs? 如何在2个独立的C#程序之间进行事件驱动编程? - How to do event driven programming between 2 separate C# programs?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM