Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SumatraPDF-settings.txt is not saved #4020

Closed
AlexL2024 opened this issue Jan 12, 2024 · 9 comments
Closed

SumatraPDF-settings.txt is not saved #4020

AlexL2024 opened this issue Jan 12, 2024 · 9 comments

Comments

@AlexL2024
Copy link

AlexL2024 commented Jan 12, 2024

SumatraPDF version

  • Version [e.g. 3.5.2, release]

Describe the bug
The settings are not saved when I change them in the Options window. The settings for each documents are not remembered despite the checked option

Additional context
in previous version 3.4.6 all options worked as intended. After upgrade despite the checked options "Remember these settings for each document" and "Remember opened files" they didn't work. To open previous files I had to manually copy SumatraPDF-settings.txt from
..\AppData\Local\SumatraPDF\SumatraPDF-settings.txt to "d:\Program Files\SumatraPDF.."
*
Sumatra options

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented Jan 12, 2024

"d:\Program Files\SumatraPDF.." may only be a PORTABLE version thus the settings in that case would potentially be fresh in that folder unless you have copied from another portable copy.
the all users installation folder C:\progr... is not allowed to hold data hence an installed version would start by building settings in current users %localappdata%

@AlexL2024
Copy link
Author

The problem is that SumatraPDF-settings.txt resides in both folders "..\AppData\Local\SumatraPDF" and "d:\Program Files\SumatraPDF", but the program doesn't save any data to any of these configuration files
And "yes", the data in "..\AppData\Local\SumatraPDF\SumatraPDF-settings.txt" is NOT used at all (that was the reason to copy SumatraPDF-settings.txt to "d:\Program Files\SumatraPDF" folder
I've never encountered such problems earlier. I just upgraded from 3.4.6 to 3.5.2 and on opening SumatraPDF after that I found that no previously opened tab was opened and no change in options is remembered either

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented Jan 13, 2024

ALL portable (non installed) versions use their .exe folder for settings. (they will NOT used an installed versions settings)

All installed versions single or multi user use the users local data folder (in a subfolder below that, to not conflict with other users)

thus there should be only 2 possible locations per user.

What can happen is much older versions used the user "Roaming" folder but MS now suggest user %localappdata% thus the \SumatraPDF\SumatraPDF-settings.txt
image

@AlexL2024
Copy link
Author

No records in the Roaming folder found
What I found out is that when I simply copied the whole folder "d:\Program Files\SumatraPDF" to "C:\Program Files\SumatraPDF" (without SumatraPDF-settings.txt in it) everything started to work properly - the changes are written in "..\AppData\Local\SumatraPDF\SumatraPDF-settings.txt".
So the problem is probably incorrect functioning of SumatraPDF.exe if it's installed in a directory other that default "C:\Program Files\SumatraPDF"

@markjeeninga
Copy link

I had the same issue with version 3.5.2, and even with version 3.4.6. I noticed the program did not generate a settings-file in the folder. The issue was solved for me by executing the program with admin rights. In the end I updated the rights in the installation folder so that the user profile full (writing) access for the folder. This solved it for me. Hope it works for you too.

@AlexL2024
Copy link
Author

Hi, Mark
I tried executing the program version 3.5.2 with admin rights and it did began to save settings, but not in the \AppData\Local\SumatraPDF\SumatraPDF-settings.txt and in the "d:\Program Files\SumatraPDF\SumatraPDF-settings.txt" (sort of like a PORTABLE version). Besides there appeared "sumatrapdfcache" folder ...

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented Jan 18, 2024

It sounds like you are using installer outside of the all users protected area there are 2 variant sizes for a reason. The bigger single exe has the install and uninstall code for the system and registry, but the smaller version is the one for portability

If it was an installed copy it should outside of the C:\program folders attempt to re-install and if you say all users into c:\program files since that's the detected previous default all users folder
image

A clean installation will start up for a single user
image

ALL USERS will start in the all users area
image

@AlexL2024
Copy link
Author

I installed (actually I just upgraded the previous version) using SumatraPDF-3.5.2-64-install.exe file (not portable) in the folder "d:\Program Files\SumatraPDF" (so before the problems described in my first post I didn't have "C:\Program Files\SumatraPDF" at all). And with versions up to 3.4.6 everything worked fine with that configuration.
Now I have 2 working options:

  1. By manually copying all files to "C:\Program Files\SumatraPDF" and starting the program from that folder I got the situation in which the program works with c:\Users\User\AppData\Local\SumatraPDF\SumatraPDF-settings.txt
  2. If I start "d:\Program Files\SumatraPDF\SumatraPDF.exe" with admin rights then he program works with "d:\Program Files\SumatraPDF\SumatraPDF-settings.txt"

So something has changed in 3.5.2 :-)

@kjk
Copy link
Member

kjk commented Feb 1, 2024

Based on description this must be a permission issue most likely settings file was created with admin permissions or in a directory where only admin apps can write to.

That's why it works in admin but not otherwise.

This could be related to imperfect upgrade code but not knowing what exactly happened I don't see a way to figure out how it got in that state.

Check permissions or just delete / un-install all versions and re-install from scratch.

@kjk kjk closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants