NSIS:将当前用户目录设置为 nsis 中的默认安装目录
NSIS: Set current user directory as default installation directory in nsis
使用什么预定义变量将当前用户目录设置为脚本中的默认安装目录?
$INSTDIR 路径为 "C:\Users{CURRENT_USER_ID}\Tools",
其中 {CURRENT_USER_ID} 是用户的唯一登录域 ID。(例如 ed00345)
; The default installation directory
InstallDir C:\Users\{Current_USER_ID}\Tools
; Set output path to the installation directory.
SetOutPath $INSTDIR
来自文档:
$PROFILE
The user's profile directory. A typical path is C:\Documents and Settings\Foo.
This constant is available on Windows 2000 and above.
InstallDir "$Profile\Tools"
但是你真的不应该在那里安装程序,请改用$LocalAppData\Programs
。
使用什么预定义变量将当前用户目录设置为脚本中的默认安装目录?
$INSTDIR 路径为 "C:\Users{CURRENT_USER_ID}\Tools", 其中 {CURRENT_USER_ID} 是用户的唯一登录域 ID。(例如 ed00345)
; The default installation directory
InstallDir C:\Users\{Current_USER_ID}\Tools
; Set output path to the installation directory.
SetOutPath $INSTDIR
来自文档:
$PROFILE
The user's profile directory. A typical path is C:\Documents and Settings\Foo.
This constant is available on Windows 2000 and above.
InstallDir "$Profile\Tools"
但是你真的不应该在那里安装程序,请改用$LocalAppData\Programs
。