tjackenpacken / taskbar-groups

Lightweight utility for organizing the taskbar through groups
MIT License
2.46k stars 203 forks source link

Changes to paths used. #68

Closed pseymour closed 10 months ago

pseymour commented 3 years ago

I moved the config and shortcuts folders to the user's profile directory, where they are guaranteed to have write access. If the application's executable ever ends up installed in Program Files, standard user accounts will not be able to write there by default.

Also created properties for the Config and Shortcuts folders, and cleaned up all the references to those folders. Now the paths to those folders are constructed in one place, rather than all over the code.

Also changed most of the path concatenations with "+" and "\" to use Path.Combine().

Some other minor cleanup items as well.

PikeNote commented 3 years ago

Great idea! It is a much better improvement than the current system. I remember ( #45 ) which required admin privileges and once it is run as admin, drag and drop won't work because the application is elevated but nothing else is. I feel like this is a much cleaner solution to that problem. I will download and test the code later today.

PikeNote commented 3 years ago

Just had built it and it seems to work, great work! If my pull does go through before this does, I can if wanted assist in updating whatever conflicts that may happen through pull requests on your repo.

I only have two suggestions/concerns from building and running it.

First, I feel like the JITComp should be with the current config folder as the usual setup had it. It simplifies it a bit and I don't think (correct me if I am wrong) that it would make much of a difference if they are both in the Local/Roaming folder.

Secondly, I think the naming of the folder in Roaming/Local should be to TaskbarGroups as all programs (that I have currently) don't really use the author/company name as the naming scheme for folder. I believe it is so every program has its unique app folder as to not mix it with others. It is also more organized to put it as the program name only as the user can quickly find since all they have to do is look for the program name instead of having to look for the author's name.

pseymour commented 3 years ago

For the JITComp folder, I had initially thought that the config and shortcuts folders should roam with the user, if this was used in an enterprise-type environment where users might use different machines. The profiling data probably shouldn't roam; it should be re-computed on each machine the user visits. But after thinking about it more, maybe none of the data should roam. Shortcuts that are valid on one machine may not be valid on another. Maybe everything should be in local AppData.

I'm not set on any particular folder name; I just picked something to have a place to store the files. The standard is to use CompanyName\ProductName, but as you can tell from your own folders, it's a hodgepodge in there. Even Microsoft, who sets the standard, can't make up their mind. I have a Microsoft folder with various data in it, and then Microsoft FxCop, Microsoft Teams and Microsoft Visual Studio. It's a mess. But like I said, I'm not set on it being any certain way, so we can change it. Maybe @tjackenpacken should decide?

PikeNote commented 3 years ago

That is a good point, and yeah I think after what you brought up about enterprise computers and roaming data, I think it most likely shouldn't roam for points that you brought up.

With the folder names, it isn't too much of a concern but yeah @tjackenpacken should decide what it should be as that in the end could easily be changed.