Inno Setup avoiding duplicate registry entries for path?

Viewed 38

I created an installer where it also adds onto the path for Environment. But let's say we install the software twice, it would also insert twice on the registry which I don't want to happen.

I tried using the Flag: createvalueifdoesntexist but it seems it doesn't work, as even there is no value that is the same, it won't insert.

This what happens...

1st Installation:

C:\Test

2nd Installation:

C:\Test; C:\Test

This what inside my [registry] section:

Root: HKA; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; 
   ValueType:string; ValueName: "PathTest"; ValueData: "{olddata}; {app}\ASA";
   Flags: preservestringtype createvalueifdoesntexist 

(formatted with linebreaks for readability)

0 Answers
Related