使用什么预定义变量将当前用户目录设置为脚本中的默认安装目录?
$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
Run Code Online (Sandbox Code Playgroud)
从文档中:
$个人资料
用户的个人资料目录。典型的路径是 C:\Documents and Settings\Foo。
该常量在 Windows 2000 及更高版本上可用。
InstallDir "$Profile\Tools"
Run Code Online (Sandbox Code Playgroud)
但你不应该真正在那里安装程序,请$LocalAppData\Programs
改为使用。