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

Got a problem you cannot solve? Try here.
ru2
Posts: 19
Joined: Tue Apr 10, 2012 5:21 pm

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

Postby ru2 » Wed Apr 19, 2023 2:39 pm

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 18658 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 18658 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

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

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

Postby FrancescoT » Fri Apr 21, 2023 11:19 am

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?
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

ru2
Posts: 19
Joined: Tue Apr 10, 2012 5:21 pm

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

Postby ru2 » Fri Apr 21, 2023 11:59 am

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"

ru2
Posts: 19
Joined: Tue Apr 10, 2012 5:21 pm

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

Postby ru2 » Mon Apr 24, 2023 12:18 pm

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.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

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

Postby FrancescoT » Mon Apr 24, 2023 12:27 pm

I wasn't referring to the pre-defined TARGETDIR variable, BUT TO YOURS; #Gs_CompanyName#, #Gs_AppName# and $TYPE$.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 26 guests