簡體   English   中英

使用Nullsoft安裝應用程序時,如何基於32/64位Windows OS在目標文件夾中顯示路徑

[英]When installing the application using Nullsoft, how to display the path in the Destination Folder based on the 32/64 bit windows OS

使用NULLSOFT安裝應用程序時,我想基於32/64位Windows操作系統在Destination文件夾中顯示路徑。

如果是32位,則應為

C:\Program Files\

如果是64位,則應為

C:\Program Files (x86)\

我在腳本中使用了InstallDir "$PROGRAMFILES64\\ " 這樣一來,對於32/64位操作系統,它都顯示C:\\Program Files\\

如果有人有任何想法,請幫助我。

您不必做任何特別的事情,NSIS會為您處理。

InstallDir $ProgramFiles32\MyApp
Page Directory
Page InstFiles

在32位Windows上將使用X:\\Program Files\\ ,在64位Windows上將使用X:\\Program Files\\ X:\\Program Files (x86)\\

$ProgramFiles是一個別名$ProgramFiles32當您生成一個32位的安裝程序和別名$ProgramFiles64當您生成一個64位的安裝程序。

僅在安裝64位應用程序時才應使用$ProgramFiles64

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM