Page 1 of 1

Write Registry Key not removed when using $TARGETDIR$ followed by other text

Posted: Wed Apr 19, 2023 2:39 pm
by ru2
Hello,

This issue seems very specific so I'm not sure if I am just missing something or if this is some edge case issue unaccounted for. I have the following Write Registry commands (for testing purposes, trying a lot):
write_registry.png
write_registry.png (23.08 KiB) Viewed 22147 times


When I run the installer in production, I see all 7 values created - great. However, when I then uninstall (using the same installer), I see 3 still remain and weren't removed like the others. All the ones with $TARGETDIR$ followed by text are the ones that don't get removed with uninstall:
write_registry_dont_work.png
write_registry_dont_work.png (28.01 KiB) Viewed 22147 times


Unfortunately the one I actually need to script is the one with $TARGETDIR$ followed by other text. So my question - is there something wrong with what I'm doing, is this some kind of limitation or is this something fixed in later versions? I am using IA10.10 so I realize it's rather outdated.

Thank you for any assistance,
Ruth

Re: Write Registry Key not removed when using $TARGETDIR$ followed by other text

Posted: Fri Apr 21, 2023 11:19 am
by FrancescoT
For what I see you are using both custom #COMPILER-VAR# and $SCRIPT-VAR$ for the reg-key path, for test purpose, did you try with specifying a literal string value in place of using custom vars?

Re: Write Registry Key not removed when using $TARGETDIR$ followed by other text

Posted: Fri Apr 21, 2023 11:59 am
by ru2
Thanks for the suggestion! I tried using literals in place of those and this is the result:
- using literals in place of the # vars, but keeping $TARGETDIR$ -> this didn't work, the key was left behind still
- keeping the # vars, but using a literal instead of $TARGETDIR$ -> this did work, the key was removed

That doesn't really help me as a workaround because I need to use $TARGETDIR$ in this key for the value and it could be customized by the user as the install location. The content of $TARGETDIR$ is a standard path like "c:\program files\applicationName"

Re: Write Registry Key not removed when using $TARGETDIR$ followed by other text

Posted: Mon Apr 24, 2023 12:18 pm
by ru2
I couldn't find a way around this so I opted to just delete it myself with the uninstall process using "Delete Registry" and the same key/value.

Re: Write Registry Key not removed when using $TARGETDIR$ followed by other text

Posted: Mon Apr 24, 2023 12:27 pm
by FrancescoT
I wasn't referring to the pre-defined TARGETDIR variable, BUT TO YOURS; #Gs_CompanyName#, #Gs_AppName# and $TYPE$.