开发者

NSIS and HKLM, Use of string

开发者 https://www.devze.com 2023-04-05 02:35 出处:网络
I used a wizard to create an NSIS installer, and then reviewed the code: It defined a variable called PRODUCT_UNINST_ROOT_KEY as \"HKLM\":

I used a wizard to create an NSIS installer, and then reviewed the code: It defined a variable called PRODUCT_UNINST_ROOT_KEY as "HKLM":

!define PRODUCT_UNINST_ROOT_KEY "HKLM"

And then used it like this:

WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"

I was wondering if ${PRODUCT_UNINST_ROOT_KEY} is: HKLM, or "HKLM", and if it still references that d开发者_运维知识库irectory if the folder is named differently (Mine is called "HKEY_LOCAL_MACHINE").

Thanks!


HKLM is HKEY_LOCAL_MACHINE (It is a pretty common alias) and HKCU is HKEY_CURRENT_USER etc.

!define PRODUCT_UNINST_ROOT_KEY "HKLM" is the same as !define PRODUCT_UNINST_ROOT_KEY HKLM but you really only need quotes if the string contains a space.

0

精彩评论

暂无评论...
验证码 换一张
取 消