1

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)

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
  • [PathMgr.dll](https://github.com/Bill-Stewart/PathMgr) has this functionality (don't add to Path if it's already there). – Bill_Stewart Mar 09 '22 at 20:13

0 Answers0