Page 1 of 1

Need to change the location of settings

Posted: Mon Jun 17, 2013 9:53 pm
by B.Douille

I'm using Xnview with Windows Seven and the various options for the location of the ini file seems not working as expected. See below, it's always in the user's profile.
I want to have a single setup for all users in my family. Mainly I want the file modified dates to be preserved if a changes are made in the public picture library.

Setting: .ini in directory User
About says "C:\Users\[username]\AppData\Roaming\XnView\xnview.ini"
Actual location "c:\Users\[username]\AppData\Roaming\XnView" :)

Setting: .ini in directory Windows
About says "C:\windows\xnview.ini"
Actual location "c:\Users\[username]\AppData\Local\VirtualStore\Windows" :( not sharable

Setting: .ini in directory XnView
About says "C:\Program Files\XnView\xnview.ini"
Actual location "c:\Users\[username]\AppData\Local\VirtualStore\Program Files\XnView" :( not sharable

Best regards

Re: Info about XnView's settings (store & load)

Posted: Wed Jun 19, 2013 8:38 pm
by cday
Is this a UAC issue?

In Windows 7 writing to the Program or Windows folders requires Admin rights, but when XnView is run from a User account the usual UAC request for the Admin password doesn't appear, the expected write operation doesn't occur but there is no indication that it hasn't been performed...

Re: Info about XnView's settings (store & load)

Posted: Wed Jun 19, 2013 9:42 pm
by B.Douille
cday wrote:Is this a UAC issue?


I think so. In the case I did the test with an administrative account so the password was not required. At least should I have seen the popup to confirm the access. This does not happen.

If the Windows directory is protected, why not use the C:\ProgramData (equiv. to "All Users\Application Data") ?

Re: Info about XnView's settings (store & load)

Posted: Tue Jul 23, 2013 8:25 pm
by B.Douille
B.Douille wrote:If the Windows directory is protected, why not use the C:\ProgramData (equiv. to "All Users\Application Data") ?


Same with XnView MP - only workaround is to deploy via the ZIP package in a non-protected, public directory. Annoying.

DB

Re: Info about XnView's settings (store & load)

Posted: Sat Apr 18, 2015 1:26 pm
by B.Douille
I'm back with the question of the actual path used by the system (Windows 7 as an example). I put a message some time ago but apparently it didn't triggered that much attention. Further comments were posted with information not verified, assuming that nothing have changed in the Windows world 8)
Unless you have an administrator account (Superuser in Unix world) , the current choice, where to store the XnView configuration file is virtual and drive to the same result: It's always in the user profile folder :x

This is because from Windows Vista all write tentative to System and Program folders is refused, limited to read only for normal users (as Unix always did). To preserve compatibility with old programs it creates virtual links to specific folders that emulates these now restricted folders, keeping r/w access. These new folders are in the individual user profile. See below:

Setting: .ini in directory User
About says "C:\Users\[username]\AppData\Roaming\XnView\xnview.ini"
Actual location "c:\Users\[username]\AppData\Roaming\XnView" that's correct :)

Setting: .ini in directory Windows
About says "C:\windows\xnview.ini" Have a look, you'll never find the .ini file here
Actual location "c:\Users\[username]\AppData\Local\VirtualStore\Windows" :( emulation not sharable

Setting: .ini in directory XnView
About says "C:\Program Files\XnView\xnview.ini" Have a look, you'll never find the .ini file here
Actual location "c:\Users\[username]\AppData\Local\VirtualStore\Program Files\XnView" :( emulation not sharable


Currently, the 3 options available are all equivalent and finally doesn't allow to share settings between users. I suggest that we keep 2 options only:
XnView.ini in the User directory for individual preferences (actual path = %APPDATA%\XnView as for now)
XnView.ini in All users directory to share preferences between users (actual path = %ALLUSERSPROFILE%\XnView)

Re: Need to change the location of settings

Posted: Thu Nov 30, 2017 12:21 pm
by B.Douille
Hello,

Can we have a change implemented in a future version?

Unless I'm wrong, the options are made to switch from "Single user mode" aka each user of a machine have is own settings to "Multiple users mode" aka all users shares a same set of settings. Since my original post there are now 2 options only, where to store the .ini file but still this is of no help as it's 100% equivalent as explained in my previous posts.

For the time being, the only way to have a true "Multi-user mode" is to use the ZIP'd package and copy the files in a folder with r/w access for all (personally I use C:\ProgramData). Some anti-virus may dislike this.

Re: Need to change the location of settings

Posted: Thu Nov 30, 2017 1:58 pm
by xnview
B.Douille wrote:For the time being, the only way to have a true "Multi-user mode" is to use the ZIP'd package and copy the files in a folder with r/w access for all (personally I use C:\ProgramData). Some anti-virus may dislike this.

by default, settings are in user data

Re: Need to change the location of settings

Posted: Fri Dec 01, 2017 7:15 am
by B.Douille
Yes, default settings are stored in the user profile. The issue is when you want to change it to in \Programs\XnView in order to share the settings for multiple users.
> A user not having administrator rights cannot create/save/update the .ini file stored in \Programs\XnView. This is a security enforcement since Windows Vista and similar to the restriction in the Unix world.
As a consequence, a user willing to change a setting for all other the change will only apply for him because the system use a virtual folder in the user's profile :(