獨立的可執行檔案和已安裝的可執行檔案有什麼區別?

雖然我們大多數人都滿足於為自己喜歡的軟體安裝可執行檔案的“久經考驗的”過程,但真的有必要這樣做嗎?我們真的可以提取那些相同的可執行檔案而不是安裝它們,並像它們的獨立同類一樣執行它們嗎?...

獨立的可執行檔案和已安裝的可執行檔案有什麼區別?

雖然我們大多數人都滿足於為自己喜歡的軟體安裝可執行檔案的“久經考驗的”過程,但真的有必要這樣做嗎?我們真的可以提取那些相同的可執行檔案而不是安裝它們,並像它們的獨立同類一樣執行它們嗎?

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。

問題

超級使用者讀者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.

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.

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.

獨立的可執行檔案和已安裝的可執行檔案之間真的有那麼大的區別嗎?還是它們比我們想象的更相似?

答案

超級使用者貢獻者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.

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 les**si.

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.

雖然我們已經瞭解到,可以提取和執行一些我們喜愛的軟體作為獨立的可執行檔案,但有時為了在我們的系統上使用我們喜歡或需要的程式,我們無法逃避舊的“久經考驗的”安裝過程。


有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?請在這裡檢視完整的討論主題(包括大大擴充套件的答案)。

  • 發表於 2021-04-11 13:14
  • 閱讀 ( 39 )
  • 分類:網際網路

你可能感興趣的文章

聯結器(linker)和裝載機(loader)的區別

...與其他檔案(如標頭檔案)連結起來並建立副檔名為.exe的可執行檔案的軟體。載入程式是將連結器生成的可執行檔案載入到主記憶體的系統軟體。這是連結器和載入器之間的關鍵區別。 目錄 1. 概述和主要區別 2.什麼是連結器 3....

  • 發佈於 2020-10-19 05:42
  • 閲讀 ( 37 )

編譯時間(compile time)和執行時(runtime)的區別

...分析和程式碼生成等任務在編譯時發生。執行編譯時生成的可執行檔案的時間段稱為執行時。這兩個術語都與不同的程式生命週期階段有關。本文討論編譯時和執行時之間的區別。編譯時和執行時的關鍵區別在於,編譯時是將原...

  • 發佈於 2020-10-19 10:25
  • 閲讀 ( 58 )

源程式(source program)和目標程式(object program)的區別

...程式與目標程式的主要區別在於源程式是程式設計師編寫的可讀程式,而目標程式是透過編譯源程式建立的機器可執行程式。 源程式可以編譯或解釋以供執行。反編譯器有助於將目標程式轉換回其原始源程式。需要注意的是,...

  • 發佈於 2020-10-26 14:27
  • 閲讀 ( 48 )

這就是軟體安裝程式在windows、macos和linux上的工作方式

...,它並沒有改變那麼多。記住,執行程式所需的一切都是獨立的。與標準拖放的唯一區別是資訊列表“檔案在系統中註冊。 ...

  • 發佈於 2021-03-14 18:20
  • 閲讀 ( 45 )

WindowsSystem32目錄:它是什麼以及為什麼不能刪除它

...名的檔案。與程式檔案(x86)一樣,Windows也包含這兩個獨立的目錄,以便與32位程式相容。如果32位程式試圖載入64位DLL,它將崩潰。 ...

  • 發佈於 2021-03-20 03:47
  • 閲讀 ( 50 )

什麼是桌面快捷方式?它是如何工作的?

...程式,你必須冒險到它在作業系統上的主頁,執行執行它的可執行檔案(.exe)。在早期的計算機時代,每當你想執行一個新的程式時,你都必須手工操作。它涉及到大量的點選資料夾目錄,以獲得你想要的地方。 ...

  • 發佈於 2021-03-29 12:12
  • 閲讀 ( 50 )

如何從linux命令列檢視二進位制檔案

...總是知道它們的入口點和函式的位置。定位在隨機地址的獨立可執行檔案(PIE)克服了這種敏感性。 如果我們用gcc編譯器編譯程式並提供-no-pie選項,我們將生成一個常規的可執行檔案。 -o(輸出檔案)選項允許我們為可執行檔...

  • 發佈於 2021-04-02 04:41
  • 閲讀 ( 47 )

如何在linux中向$path新增目錄

...搜尋順序。 如果要檢視命令是shell內建、別名、函式還是獨立二進位制mv/work/unfile,可以使用type命令,如下所示: type clear type cd 這告訴我們clear是一個二進位制檔案,在路徑中找到的第一個檔案位於/usr/bin。您的計算機上可能...

  • 發佈於 2021-04-02 14:04
  • 閲讀 ( 42 )

linux下如何使用which命令

...查詢這些命令。 但是Bash如何定位其他命令、程式和外部獨立二進位制檔案呢?Bash使用路徑,實際上是一組路徑,每個路徑指向一個目錄。然後,它在每個目錄中搜索與您試圖執行的命令或程式匹配的可執行檔案。當它找到一個...

  • 發佈於 2021-04-02 20:07
  • 閲讀 ( 47 )

如何在ubuntu上建立桌面快捷方式

...性的文字檔案。除此之外,它們還告訴作業系統二進位制可執行檔案在檔案系統中的位置。當您雙擊快捷方式時,Linux使用這些資訊來查詢並啟動應用程式的二進位制檔案。我們只需要找到正確的.desktop檔案。 作為發行版預設軟...

  • 發佈於 2021-04-03 00:02
  • 閲讀 ( 50 )
Es1ee
Es1ee

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦