Opened 4 years ago

Last modified 13 months ago

#1053 new Bug

MPC-HC x64 doesn't keep settings between sessions on Win7 standard account

Reported by: goyta Owned by:
Priority: normal Milestone: next release placeholder
Component: General Version: 1.4.2499
Severity: major Keywords: "windows 7" x64 standard account save settings
Cc: underground78 Evaluation:

Description

As indicated in the summary above. Most of the time, I use a standard account on Windows 7 for better security. MPC-HC works perfectly when I'm using my administrative account (other than the WMV bug reported elsewhere). When I use the standard account, however, it doesn't keep the settings for the next session, including those from the Options window, but also more trivial parameters such as zoom, video frame or language. If I use "Run as Administrator," it will work fine, but will also save the settings to the admin account, not the current session's account.

I tried setting MPC-HC to use a .ini file, but it didn't work. I checked the NTFS permissions, and the folder can be written from any possible account. This did, however, open the possibility for a workaround, albeit an annoying one: I run it as administrator, save the settings I want, then copy the files from C:\Users\<admin acct>\AppData\Roaming\Media Player Classic to the corresponding folder of the standard user account. Then the saved settings are kept for the next session on the standard account, but of course it's not convenient to have a UAC prompt and do that copy every time I want to change even the most trivial of my settings. This program is about entertainment above anything, and it should be care-free to use.

My system: Windows 7 Home Premium x64, all Windows Update patches applied, no codec packs installed, AMD Phenom II X6 1090T processor, 8 GB RAM, Radeon HD6850 video card with the latest Catalyst drivers (10.12), 1 TB hard disk with plenty of free space.

Thanks.

Change History (24)

comment:1 Changed 4 years ago by xhmikosr

  • Cc underground78 added; gfvjbr-sourceforge@… removed

comment:2 Changed 4 years ago by lorenamelang

I'm using Win7_32-bit, and with MPC 1_5_1_2928 or 1.5.3.3666 I can't "Store settings to .ini file". I check the checkbox, Apply or OK, nothing happens, and the next time I look the box is unchecked.

Unless I "Run as Administrator" - then it makes mpc-hc.ini, but in C:\Program Files\Media Player Classic - Home Cinema, not in a properly accessible data file location. Obviously I don't want to have to go through UAC every time I play a video, so that's pretty useless except to make a backup copy.

I see ticket #1053 with the ini file in "AppData\Roaming" - why doesn't mine store the file there? Is there some way to change the file location? Has there been a change since Dec 2009 when this computer was new?

comment:3 Changed 3 years ago by xhmikosr

  • Cc Aleksoid v0lt added
  • Severity changed from major to blocker

comment:4 Changed 3 years ago by v0lt

The player stores the settings in the registry.
Storing the settings in the ini is made for portable use (CD, USB). Do not use the ini file if the player is in "Program files" folder.

comment:5 follow-up: Changed 3 years ago by underground78

I think that if the ini cannot be created in the same folder than MPC-HC we should put it in the AppData folder. The default behavior won't change and everyone will be happy.

comment:6 in reply to: ↑ 5 ; follow-up: Changed 3 years ago by v0lt

Replying to underground78:

I think that if the ini cannot be created in the same folder than MPC-HC we should put it in the AppData folder. The default behavior won't change and everyone will be happy.

Not everyone will be happy. .ini file located in the folder player because it should be.
Simply move .ini file can not be.

What do not like storing settings in the registry?

comment:7 in reply to: ↑ 6 Changed 3 years ago by underground78

Replying to underground78:

I think that if the ini cannot be created in the same folder than MPC-HC we should put it in the AppData folder. The default behavior won't change and everyone will be happy.

Not everyone will be happy. .ini file located in the folder player because it should be.
Simply move .ini file can not be.

I don't understand that's wrong with putting the ini file elsewhere ONLY when it cannot be created in the player folder. I don't want to change the default behavior, the ini will still be placed in the player folder when possible.

What do not like storing settings in the registry?

I don't know but it's a common request from users.

comment:8 Changed 3 years ago by xhmikosr

@Undeground78: Just go ahead and make mpc-hc store the ini file in appdata IF we can't write to the same folder the exe is due to UAC. Portability IS the same, we'll just get rid of stupid reports. It's the player's job to predict actions which make no sense, you can't expect the user to be aware of the limitations.

comment:9 Changed 3 years ago by v0lt

Then we should not write to the registry at all (except the settings of external filters).

comment:10 Changed 3 years ago by underground78

Why? I don't get the link with the registry. If the user doesn't want to use it, he can use the ini file.

comment:11 Changed 3 years ago by xhmikosr

@v0lt: if you can't understand what one writes, you shouldn't just jump in and write whatever comes in mind. What I suggest makes complete sense to everyone else except for you.
This ticket is not about NOT writing to the registry. This ticket is about MPC-HC's wrong behavior when UAC is enabled, MPC-HC is installed in Program Files and the user chooses to save the settings in the ini file.
We can't expect from the user to understand why this fails. We should handle this case the right way. And the right way is to write the ini file in a directory where we have access to write to; that directory is the APPDATA directory.
If we can write to the same directory where the executable is then the behavior will be the same as before.

comment:12 follow-up: Changed 3 years ago by v0lt

I think the player should have only two places to store the settings.

  1. in the system (registry or APPDATA. one, but not together)
  2. in the player folder.

I think so right.

I do not use UAC.

comment:13 Changed 3 years ago by xhmikosr

Well in a ideal world everything would be perfect. I don't use UAC either. But this doesn't mean that the player shouldn't take care of this case. And since we allow the player to keep the settings in INI even if it cannot write to the same folder the executable is then we have to make a decision.

1) Use APPDATA to store the ini
2) Disable the Save to ini setting if we can't write to the same folder as the executable and offer elevation or something
3) Work around this by saving the ini in the APPDATA folder

comment:14 in reply to: ↑ 12 Changed 3 years ago by thevbm

Replying to v0lt:

I think the player should have only two places to store the settings.

  1. in the system (registry or APPDATA. one, but not together)
  2. in the player folder.

I think so right.

I do not use UAC.

Then why we have default.mpcpl in APPDATA ? Shouldn't it be stored in .exe folder instead ? (It is in exe folder only when using .ini)
At the moment it's mixed then.

comment:15 Changed 3 years ago by lorenamelang

I'm one of the original reporting users. MPC-HC is complex enough that when I get a setup that works, I like to have a backup of those settings. By the time you've added some complex codec or add-in and discovered it didn't do what you hoped, it is nearly impossible to recreate what was working before. At least for normal users... There are just too many pages of options.

So when I saw the option to create an .ini file, it seemed like a ready made solution. It took me a lot of time to figure out that it didn't work for me, and why it didn't work. To me, the current system is broken - it doesn't do what it appears it would. If there was no .ini file option, I'd just consider the program unfriendly, not broken. If there was a note beside the .ini file option warning that it requires admin access, it also wouldn't be broken, just unfriendly.

Friendly would be not only the option to use an .ini file, but the option to use multiple named .ini files and start the app by choosing one. For instance, I normally use the MPC renderer to get WASAPI exclusive audio from flv and mp4 files. But (last time I tried... I know things change frequently...) it couldn't seem to play a DVD PCM track through WASAPI exclusive. I found a way to do that, but it broke my flv/mp4 playback. Multiple .ini files could solve such problems.

Please consider...

comment:16 Changed 3 years ago by goyta

And I was the original poster. If you pay attention to my post, I tried using the .ini file after the default method didn't work and my settings weren't being saved from a standard account. So, if it was (or should have been) the Registry, it wasn't working either from a standard account, and therefore, @xhmikosr, apparently it is a problem of not writing to the registry as well.

Of course, I didn't like to see my bug report qualified as "stupid" and something to "get rid of." I was a real-world user with a real problem that I would like to be solved. As such, if I'm reporting a bug, I'm contributing to make the software better. That deserved some respect.

Also, if I use a standard account, given that I'm this PC's only actual user, it's obvious that I'm concerned about security, which is also the reason why I won't disable UAC - which, as you know, does much more than just dimming the desktop and asking for an admin user's authorization. Between the lines, your comments sounded as if a user was being stupid or stubborn to use UAC, but it's a perfectly valid choice with many sound reasons, and one that will be encountered by default in real life.

Most importantly, don't lose track of the real problem. It's not whether the .ini file can be written to the program folder or whether it should be placed in AppData or totally disabled. It's allowing a standard user to save his/her settings between sessions, by any available means, which is currently not possible. The .ini file could be a way to do that, but at present it isn't.

Anyway, because of this, plus the WMV bug and other problems, I no longer use MPC-HC (note that the ticket is over a year old). I've given up. I've switched to VLC, which does what I expect it to do and is very solid and stable. I still hope that MPC-HC solves its problems and wish you all well, because it would be a waste if it didn't - other than these bugs and conceptual flaws, it's a great project.

comment:17 follow-up: Changed 3 years ago by underground78

A standard user is supposed to have access to the registry I think. We use directly the Windows API for settings storage and really I think it should work when using the registry. If it doesn't we certainly need to investigate that but I think it's that most people use and it seems to work correctly for most of them.

That being said, we should probably rethink the way we use the ini file because currently we know it doesn't behave well with UAC.
I think we should offer two modes: a "safe" ini mode which would write the ini file in the AppData folder (the user is supposed to always have write access to it) and a "portable" ini mode which will be exactly the same that current behavior.
When starting MPC-HC

  • if an ini file is present in the same folder than the executable, the portable mode will be used,
  • else if an ini file is present in the AppData folder, the safe ini mode will be used
  • else the registry will be used.

Does it seem sane to you?

comment:18 Changed 3 years ago by thevbm

  • Cc Aleksoid v0lt removed
  • Milestone set to next release placeholder

References of dupes #1739 and #2135.

comment:19 Changed 3 years ago by clsid2

It is correct behavior (according to MS guidelines) to store the INI in AppData when AppDir is not writable.

It is possible to adjust the access permissions when using the installer. But it requires adding an extra option to the installer. Example:
Source: mpc-hc_empty.ini; DestName: mpc-hc.ini; DestDir: {app}; Flags: onlyifdoesntexist; Permissions: everyone-modify; Tasks: use_ini_file

comment:20 in reply to: ↑ 17 Changed 3 years ago by armada651

I agree with underground78 on the behaviour, only I'd like to repurpose the "Save to ini file" option. It would have the following behaviour:

  • If the ini file is present in the same folder as the executable, the portable mode will be used regardless of the "Save to ini file" setting.
  • If "Save to ini file" is enabled it will save settings in the AppData folder.
  • If "Save to ini file" is disabled it will save settings to the registry.

comment:21 Changed 3 years ago by underground78

Hmm people would have to create their own ini file to make the app portable. I'm not sure it's really user-friendly. I think it would be easier for users to have 3 choices: registry, ini in AppData, ini portable. I'm not sure how we could do that cleanly though.

comment:22 Changed 18 months ago by armada651

  • Severity changed from blocker to major

comment:23 Changed 15 months ago by steven penny

Yes please fix this so that MPC will use INI file from APPDATA if found.

xhmikosr will agree this is already being used with his other program

http://github.com/XhmikosR/notepad2-mod

comment:24 Changed 13 months ago by petrozzz

Is something happening to resolve this? I see that it's been 3 years now. I gave writing authorizations to all accounts but still I cant change any configuration if not through UAC. The option "remember file position" doesnt work if I use the player with a regular account and not the admin.

Note: See TracTickets for help on using tickets.