Opened 7 years ago

Last modified 7 years ago

#837 new Bug / Defect

HKCU\Software\OpenVPN-GUI is deleted if "version" key is missing

Reported by: tschoening Owned by:
Priority: major Milestone:
Component: Windows GUI Version: OpenVPN 2.4.0 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc:

Description

I upgraded from version 2.3.13 to 2.4 and wondered about the new defaults for user specific configuration files and such. My former system wide defaults where not used anymore. So after debugging this with Process Monitor and recognizing that HKCU seems to be queried only, I cleaned the HKCU part and imported my HLKM settings there. The new "version" key introduced with #252 was missing in that case, because it was new and I cleaned the former settings to get rid of maybe wrong ones, and on every restart of the GUI the app deleted the whole HKCU\Software\OpenVPN-GUI. The only error message on gets is that there's no configurations found because of the used default values in such case.

This looks like a somewhat unexpected behaviour to me.

If you think that a missing version key is so important to delete whatever is in place currently, I would expect a detailed error message telling me so. Without such message I could only wonder about the missing settings until I noticed that behaviour in Process Monitor again.

I would like to suggest considering not deleting at all. If you find a missing version key, simply add one and whatever keys are needed for the particular version and live with everything else. You can't forbid the user to add any kind of garbage at any time anyway.

Attachments (1)

OpenVPN-GUI Delete in case of missing version.png (178.6 KB) - added by tschoening 7 years ago.
Delete in case of missing version

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by tschoening

Delete in case of missing version

comment:1 Changed 7 years ago by Selva Nair

So if you manually edited HKCU in a way incompatible with newer versions (say version key missing), there are no guarantees that a reinstall will not overwrite the HKCU key. The right way to edit settings is to use the settings menu in the GUI, do not edit the registry.

comment:2 in reply to:  1 Changed 7 years ago by tschoening

Replying to selvanair:

So if you manually edited HKCU in a way incompatible with newer versions (say version key missing), there are no guarantees that a reinstall will not overwrite the HKCU key.

Of course there is, I'm installing the software as admin and using it as another user the installer doesn't know anything of.

The right way to edit settings is to use the settings menu in the GUI, do not edit the registry.

I had a fully working installation and needed to migrate it for no reason and without any documentation, it was simply easier to just copy my existing configuration. As long as your version key is present you don't even seem to care about which additional data is stored by the user in "your" key anyway. But if it's missing you are not even logging any error message or warning, but are simply deleting user data you don't know anything of. The only thing you know is it's there, you don't know why or what, and your best conclusion is to silently delete it?! If the iservice is not running you present an error message, but you don't care a thing about user data?

This is a bug.

Note: See TracTickets for help on using tickets.