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

[BUG] "Store config at the assembly location" not working for "protected folder locations" #321

Closed
chip33 opened this issue Feb 7, 2022 · 4 comments
Assignees
Labels
Projects
Milestone

Comments

@chip33
Copy link
Contributor

chip33 commented Feb 7, 2022

Description, Steps to reproduce, Expected behavior, Screenshots

Windows 11 Pro 22000.469, latest stable release.
SystemTrayMenu 1.2.6.0

I saw that you see reports from users and try to fix them.

I noticed that sometimes "Store config at the assembly location" does not place a user.config there and the tick does not stick in the settings box.
I think this is due to windows permissions blocking it when it is located in a protected location like "Program Files".

I have UAC at minimum and run as administrator, Windows will not let me for example create a zip of a file or drop a browser bookmark shortcut into folders in "Program Files".
The easiest way to test that strict permissions are in force on that folder is by right clicking a file and trying to make a shortcut of it. If you get this message you know access is restricted.

Screenshot 2022-02-07 162248

You should be able to reproduce this by moving the STM assembly location folder with an active user.config inside to a protected folder location, launch a new instance of STM from there and when you try to change settings in STM it will crash as it tries to edit the user.config and fails.

Screenshot 2022-02-07 164232

Here if you try to create a new user.config it will not be created and the tickbox for "Store config at the assembly location" will remain unchecked.

@Hofknecht
Copy link
Owner

@chip33
Thank you for reporting!
we will try to reproduce.

Hofknecht added a commit that referenced this issue Feb 7, 2022
@Hofknecht
Copy link
Owner

exception now catched with version 1.2.6.2
instead you will find a log entry: Failed to store config at assembly location

but maybe it not solves your issue in that moment, you need to delete the file manually from the location since you also created it there, the application can not delete it. We use to place a user,config for import so we can also not ignore this and just save internal.

closed

@chip33
Is this ok? otherwise just reopen.
if you want to you can retest and agree that is not more crashing at this pont.

@Hofknecht Hofknecht added FAQ and removed help wanted labels Feb 7, 2022
@Hofknecht Hofknecht self-assigned this Feb 7, 2022
@Hofknecht Hofknecht added this to Analyze / Spec in STM 1.3.0 via automation Feb 7, 2022
@Hofknecht Hofknecht added this to the 1.3 milestone Feb 7, 2022
@chip33
Copy link
Contributor Author

chip33 commented Feb 7, 2022

Works well, no more crash and a warning in logfile !

thanks for fixing the blank line before the comment in my commit :)

@Hofknecht
Copy link
Owner

perfect, thank you for testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
STM 1.3.0
  
Closed
Development

No branches or pull requests

2 participants