View Single Post
Old 5th January 2018, 22:41   #14
Anders's Avatar
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,915
We could detect "" and "${xyz}" in the compiler. Possibly "$(xyz)" but not "$xyz", that can only be detected at run-time. The soon to be released NSIS v3.03 will also allow you to turn warnings into errors in the .nsi with a !pragma.

1) To delete a registry key we have to delete all the children first. The order of keys returned by Windows is undefined. When we find a child key we cannot delete the whole operation is aborted but the already deleted keys are gone.

2) I will try to discuss it with kichik before the next release. I have already added some basic code to installers to try to stop this. We are however a little bit in undefined territory here. You are allowed to open a "" subkey but MSDN does not specify what happens when you try to delete one. We call RegDeleteKeyEx if it is available and RegDeleteKey if not and things might also vary depending on the Windows version and if it is 64-bit or not (the WOW64 layer might not be 100% compatible with the "real thing").

3) It looks like there is something wrong/changed with the ACL on the BCD00000000\Description key on Windows 10. On Windows 8 you would not be able to delete it so easily. The next key (Objects) however is more locked down so the delete operation would end there.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote