![difference-between-stand-alone-and-installed-executable-files difference-between-stand-alone-and-installed-executable-files](https://i-blog.csdnimg.cn/blog_migrate/85574408e844fee884618406fc2b598e.png)
While most of us are content to go with the ‘tried and true’ process of installing the executable files for our favorite software, is it really necessary to do so? Could we actually extract those same executable files rather than install them, and run them the same as their stand-alone cousins?
尽管我们大多数人都满足于为我们喜欢的软件安装可执行文件的“尝试而真实”的过程,但确实有必要这样做吗? 我们是否可以提取那些相同的可执行文件,而不是安装它们,然后以与它们独立的表亲相同的方式运行它们?
Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.
今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。
问题 (The Question)
SuperUser reader Tom Turkey wants to know what the difference between a stand-alone and installed executable file is:
超级用户读者Tom Turkey想知道独立文件与已安装的可执行文件之间的区别是:
I have noticed on Windows, at least, that you can download a direct, statically-linked executable file and launch it directly, or write your own program and execute it (even dynamically) without having to install it.
我至少在Windows上注意到,您可以下载一个直接的,静态链接的可执行文件并直接启动它,或者编写自己的程序并执行它(甚至是动态执行)而不必安装它。
That brings me to my main point…what’s the purpose of the installation process? I mean besides maybe the Windows Registry. However, for practicality and usage purposes, it’s possible to have a single, independent, stand-alone program that can be run, stored on non-volatile storage, and accessed via the file system of whatever device it’s on, and executed on the OS.
这将我带到了重点……安装过程的目的是什么? 我的意思是说,也许还有Windows注册表 。 但是,出于实用性和使用目的,可以有一个独立的独立程序,该程序可以运行,存储在非易失性存储器中,并可以通过所用设备的文件系统进行访问并在OS上执行。
So what’s the big deal with all the “install this” business if many great programs of virtually any magnitude can work perfectly without going through an installation configuration? It puzzles me a bit, and aside from a database or other metadata/access configuration systems, what is the real difference here if the latter (an installed executable) performs and works in the same way as a stand-alone?
那么,如果实际上许多大小的优秀程序都可以在不经过安装配置的情况下完美运行,那么对所有“安装此”业务有什么大帮助呢? 这让我有些疑惑,除了数据库或其他元数据/访问配置系统之外,如果后者(已安装的可执行文件)以独立方式执行和工作,那么这里的真正区别是什么?
Is there a difference here I’m unaware of with a non-installed program versus an installed one?
我不知道未安装的程序与已安装的程序有什么区别吗?
PS: This doesn’t just have to apply to Windows OSes, but any that implement a similar function.
PS:这不仅适用于Windows操作系统,而且还适用于实现类似功能的任何操作系统。
Is there really that much of a difference between stand-alone and installed executable files, or are they more alike than we might suspect?
独立文件和已安装的可执行文件之间确实有很大的区别,还是它们比我们所怀疑的更相似?
答案 (The Answer)
SuperUser contributor Wyatt8740 has the answer for us:
超级用户贡献者Wyatt8740为我们提供了答案:
Brief answer: a stand-alone exe requires no libraries be installed on the computer to run, and requires no registry entries or other components.
简要答案:独立exe不需要在计算机上安装任何库即可运行,并且不需要注册表项或其他组件。
An installed file can be a stand-alone in an installer package, but is generally dependent on a variety of components and libraries installed alongside it.
安装的文件可以是安装程序包中的独立文件,但通常取决于与之一起安装的各种组件和库。
In many cases, through the use of Universal Extractor (unofficial update: here), you can extract the contents of an installer and run a program without administrative privileges in Windows. MSI installers can be unpacked with lessmsi.
在许多情况下,通过使用Universal Extractor (非官方更新: here ),您可以提取安装程序的内容并在Windows中在没有管理特权的情况下运行程序。 可以使用lessmsi打开MSI安装程序的包装。
In most other operating systems, all programs can be run without root/administrator privileges, through user-specific ‘bin’, ‘lib’, and other directories in the home directory. Personally, I despise installers the majority of the time, because they make it harder for me to use programs without administrative privileges when I don’t have them. But they are packaged that way by large companies to simplify the process for the average end user.
在大多数其他操作系统中,可以通过用户特定的“ bin”,“ lib”和主目录中的其他目录,在没有root /管理员特权的情况下运行所有程序。 就个人而言,我大部分时间都鄙视安装程序,因为当我没有安装程序时,它们会使我更难使用没有管理特权的程序。 但是,它们被大公司打包,以简化普通最终用户的流程。
While we have learned that it is possible to extract and run some of our favorite software as stand-alone executable files, sometimes there is just no escaping the old ‘tried and true’ installation process in order to use a program we like or need on our system.
虽然我们已经知道可以将某些我们喜欢的软件提取并运行为独立的可执行文件,但有时为了使用我们喜欢或需要的程序,没有逃避旧的“尝试并真实”安装过程我们的系统。
Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread (with greatly expanded answers) here.
有什么补充说明吗? 在评论中听起来不错。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论主题(答案大大扩展) 。