Need to change the location of settings

Ideas for improvements and requests for new features in XnView Classic

Moderators: XnTriq, xnview

Post Reply
User avatar
B.Douille
Posts: 182
Joined: Sat Sep 09, 2006 9:25 pm
Location: Hte Savoie - France

Need to change the location of settings

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

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
Last edited by B.Douille on Sat Apr 18, 2015 11:39 pm, edited 2 times in total.
Daniel, promoting XnView since 2004 and now using MP only (Platform Windows 10 & Windows 7, both 64 bits)

cday
XnThusiast
Posts: 1811
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

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

Post by cday » Wed Jun 19, 2013 8:38 pm

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...

User avatar
B.Douille
Posts: 182
Joined: Sat Sep 09, 2006 9:25 pm
Location: Hte Savoie - France

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

Post by B.Douille » Wed Jun 19, 2013 9:42 pm

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") ?
Daniel, promoting XnView since 2004 and now using MP only (Platform Windows 10 & Windows 7, both 64 bits)

User avatar
B.Douille
Posts: 182
Joined: Sat Sep 09, 2006 9:25 pm
Location: Hte Savoie - France

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

Post by B.Douille » Tue Jul 23, 2013 8:25 pm

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
Daniel, promoting XnView since 2004 and now using MP only (Platform Windows 10 & Windows 7, both 64 bits)

User avatar
B.Douille
Posts: 182
Joined: Sat Sep 09, 2006 9:25 pm
Location: Hte Savoie - France

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

Post by B.Douille » Sat Apr 18, 2015 1:26 pm

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)
Daniel, promoting XnView since 2004 and now using MP only (Platform Windows 10 & Windows 7, both 64 bits)

User avatar
B.Douille
Posts: 182
Joined: Sat Sep 09, 2006 9:25 pm
Location: Hte Savoie - France

Re: Need to change the location of settings

Post by B.Douille » Thu Nov 30, 2017 12:21 pm

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.
Daniel, promoting XnView since 2004 and now using MP only (Platform Windows 10 & Windows 7, both 64 bits)

User avatar
xnview
Author of XnView
Posts: 30018
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Need to change the location of settings

Post by xnview » Thu Nov 30, 2017 1:58 pm

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
Pierre.

User avatar
B.Douille
Posts: 182
Joined: Sat Sep 09, 2006 9:25 pm
Location: Hte Savoie - France

Re: Need to change the location of settings

Post by B.Douille » Fri Dec 01, 2017 7:15 am

Yes, with the default option "User", settings are stored in the user profile. Each user of the machine sets his own preferences, independently:


The original idea of the 2nd option "Program (XnView)" was to have a single .ini file so all users have the same settings for consistency (for exemple "Keep original date" or "Export rating in XMP"). The issue is currently it is not possible, unless you are Administrator of the machine:
Location of Settings - Option Program (XnView).jpg
Location of Settings - Option Program (XnView).jpg (26.13 KiB) Viewed 202 times
This is a security enforcement since Windows Vista where a normal user cannot affect the \Program folder and is similar to the restrictions in the Unix world.
The solution is to store the .ini file in a folder made for purpose: C:\ProgramData (system variable %ProgramData=%) - equivalent to /etc in Unix world
Daniel, promoting XnView since 2004 and now using MP only (Platform Windows 10 & Windows 7, both 64 bits)

Post Reply