Registry keys always overwritten on install/upgrade

33 views
Skip to first unread message

Ryan Launchbury

unread,
Apr 29, 2024, 11:20:27 AMApr 29
to innosetup
Hello,

I'm running Inno Setup 6.2.2 on my Windows 11 machine (but have observed the issue on Windows Server 2022 too).

Below is an extract of my registry configuration:
[Registry]
Root: "HKLM32"; Subkey: "SOFTWARE\MyApp\MySubkey"; ValueType: string; ValueName: "LogLevel"; ValueData: "info"; Flags: createvalueifdoesntexist; Permissions: admins-full;  Check: not IsWin64
Root: "HKLM64"; Subkey: "SOFTWARE\MyApp\MySubkey"; ValueType: string; ValueName: "LogLevel"; ValueData: "info"; Flags: createvalueifdoesntexist; Permissions: admins-full;  Check: IsWin64

I'm noticing that each time the installer runs, any value that has been set in the registry is overwritten. For example, if the string value for 'LogLevel' was 'debug', it would be reset to 'info' each time.

I have removed the 'Run' section from my config to ensure that it's not another script or application changing these values.

Is this something that has been seen before, or does anyone have any recommendations?

Much appreciated,
Ryan

Martijn Laan

unread,
Apr 29, 2024, 1:40:11 PMApr 29
to innosetup
Hi,

Tried it and was not able to reproduce your problem:

First run creates the value and shows lines like this in the log
"2024-04-29 19:37:23.434   Creating or setting the value.
2024-04-29 19:37:23.435   Successfully created or set the value."

Second run does not touch the value and doesn't have the lines in the log.

Please always post a full script showing the problem instead of just a snippet.

Greetings,
Martijn Laan

Op maandag 29 april 2024 om 17:20:27 UTC+2 schreef Ryan Launchbury:

web tech

unread,
Apr 29, 2024, 1:40:25 PMApr 29
to inno...@googlegroups.com
Try to update your drivers

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/innosetup/cbb48b18-f546-4b13-97a0-5d83da5ef5acn%40googlegroups.com.

Ryan Launchbury

unread,
Apr 30, 2024, 6:21:28 AMApr 30
to inno...@googlegroups.com
Hi All,

Thank you for your quick responses.
Whilst creating a minimal test-case I have found that the reason for the issue was my own misunderstanding of the 'deletekey' flag, thinking it would just remove the item I had added the flag to. I now realise the flag I actually wanted was 'deletevalue'.
With that flag set, I get the expected behaviour of keys not being overwritten.

Many thanks for your suggestions.

Best,
Ryan



From: inno...@googlegroups.com <inno...@googlegroups.com> on behalf of web tech <fostern...@gmail.com>
Sent: 29 April 2024 16:22
To: inno...@googlegroups.com <inno...@googlegroups.com>
Subject: Re: Registry keys always overwritten on install/upgrade
 
You received this message because you are subscribed to a topic in the Google Groups "innosetup" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/innosetup/Vjsrc4BMi98/unsubscribe.
To unsubscribe from this group and all its topics, send an email to innosetup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/innosetup/CAA4LrxGi8YgyO46gWtVBU8fuF_rfc1UkPQJG_ezPp5WM97G2Tg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages