LesFerch / WinSetView

Globally Set Explorer Folder Views
MIT License
1.08k stars 46 forks source link

Protect user's existing settings when replacing app with a newer version #116

Closed amymor closed 4 months ago

amymor commented 4 months ago

Hello and thanks for such a great app that has saved me so many times, I've been using it since it was on Mshta. But I recently updated from 2.76 to 2.96 and noticed that two useful buttons are gone, can you restore them in the next update? Also I noticed the settings saved in Win10.ini and thank goodness I made a backup before replacing it with the new version. I mean, the downloaded zip has default settings, so it's very dangerous when we update. I suggest you save all the settings to a global ini file that is automatically created by the program at startup, so when we download the program the package does not contain that ini, also for the default settings you can create a separate folder (Let's name it "Defaults") so we can restore the default settings in the GUI using these ini's too. The last request is to make it portable as I noticed the positions settings are saved in the registry. Thanks in advance.

amymor commented 4 months ago

I replaced the Win10.ini with my backup, and then those two buttons reappeared, then I compared the two ini's and found that "Interface=2" did the trick, then I noticed that the Advanced option in The GUI does the same.

LesFerch commented 4 months ago

I get your point about the INI files. Maybe a folder for defaults that copies to AppData if it's not already populated. I'll give it some thought. In the meantime, it's really just a matter of not overwriting the AppData folder when upgrading. There are inherent challenges in managing user settings for a portable program. Programs that install to "Program Files" and keep user settings in the user's AppData folder or the registry don't have that challenge, but then they're not portable.

The window position is intentionally not portable because that is hardware dependent. The window could end up loading off screen completely on another computer if your saved position is on a second monitor or is at invalid position (e.g. 4K display vs HD display).

For the Load and Save settings buttons, it sounds like you only had to select "Advanced" from the drop down menu. Or, after downloading a new version, always replace the AppData folder with you current AppData folder. There are no program parts or version dependencies in the AppData folder.

I'll change the title to something that reflects the issue of protecting the user's settings when upgrading and keep it open for that.

LesFerch commented 4 months ago

This improvement is now in version 2.99.