Forum moved here!

Home / Problem with user settings under %LocalAppData%

MarkosMitsosERGO

Hi,
in the most recent versions of SumatraPDF the user settings are no longer kept under %AppData% but under %LocalAppData%.
This may hold advantages for many users, but in my setting it creates a serious problem: in it %AppData% is server independent and is saved, whereas %LocalAppData% is server dependent and thrown away every night.
That fore I cannot use user settings any more…
Is there a way round this?
Is a version planed which would accept a path for user settings as an installation parameter and/or as calling parameter of the exe?

GitHubRulesOK

The -appdata function has been there for many versions (it is useful for users to have multiple profiles) but in this case you can set to -appdata C:\users\name\AppData\Roaming\SumatraPDF to emulate prior behavior

  1. The folder should exist first, it may not be created at runtime (md %appdata%\SumatraPDF) For multiple accounts on each machine ensure they are all preset
  2. If the -appdata C:\users\na me\AppData\Roaming\SumatraPDF has spaces the location must be “quoted” and no guarantee with foreign/UTF characters (consider short names or a “Z:\workdir\ansi\latin” location) but see next comment.
  3. You should avoid using %appdata% as directly passing -appdata should be absolute "hard coded " (but ymmv IF the settings are “seeded” it may respect -appdata "%appdata%\SumatraPDF") For 99% of multiple users that should work best when ONE icon is in “Public” desktop

    image

depending on user language, scripting may need to be something like
"path to \sumatrapdf.exe" -appdata "C:\users\na me\AppData\Roaming\SumatraPDF" "%1"

Just beware if there is any hiccup as you have noticed the fallback is now %localappdata% The %localappdata% Folder will still be built on first run as potentially needed for per user
LOCAL machine dependent crash reports and user or crash will create 3 *.pdb in the crashinfo sub-directory BUT normally should stay empty. However, it is worth having a “peek” IN that before Purging the machine users history, and if necessary for a crash report include the users “roaming” history along with the more important LOCAL report i.e. the whole reason for keeping all files local