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.
精彩评论