Search code examples
windowsregistryinno-setupregedit

InnoSetup - adding value to default subkey?


How do i add default ValueData to the subkey? for example:

[Registry]
Root: HKLM; Subkey: "Software\My"; ValueType: string; ValueName: "(Standaard)"; ValueData: "{app}"

How can i make sure the value {app} i am adding to the default? Depending on OS language such as mine is Nederlands i have a default key (Standaard) but in English language this key can be (Default) or for other languages it maybe random.


Solution

  • SOLVED - ValueName if empty then it use the default

    [Registry]
    Root: HKCU; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
    Root: HKCU; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
    Root: HKLM; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
    Root: HKLM; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
    Root: HKLM; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: ""; ValueData: "{app}"