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
Feature/alternative autostart win #1311
Conversation
* prevented on best effort basis inconsistent states * extracted the registry setting as an own strategy (by methods) * refactored the overriden methods to call the strategies (registry or folder) depending on the different variables * removed Powershell specific ToggleException * added documentation
@overheadhunter Regarding the symbolic links, normally one need admin priviliges to create them in Windows, therefore, this is not a feasible way (at least for the time being). |
Since these shortcuts are per user, I guess there should also be a user-owned auto start dir, i.e. where the user can add his*her own startup items without admin privileges. Edit: To be more precise: The folder in question seems to be |
This actually doesn't matter. As long as the local Windows installation is not in developer mode, admin priviliges are required to create symbolic links (independet from location or target) (see for example here) |
(cherry picked from commit 8c4d35d)
* corrected bad english * improved documentation * restricted visibility of specific exception
So shortcuts are not symlinks? |
Yes. Shortcuts are real files with all the consequences (applications must support this file type, they have an extension, etc.) , while symbolic links are references on the the filesystem level. |
Is the shortcut "format" well-defined and can we create such a "normal" file with shortcut-content ourselves? I still would prefer not to launch some ps script. |
It is a binary format, hence i don't believe we can create it by ourselve. There is also no documenation about its format. The other way than using a ps script would be using the native API. Since Cryptomator has a native-library dependency, this could be done in the future, but for now i would suggest to roll with the powershell solution. |
Shouldn't this be the documentation? https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-shllink/16cb4ca1-9339-4d0c-a68d-bf1d6cc0f943 Doesn't look so simple though. 😆 |
@tobihagemann thanks, i didn't know that. But yeah, skimming through the documenation, it seems like it would be worth a whole library by its own.. |
Here is an overview of what got changed by this pull request: Complexity increasing per file
==============================
- main/ui/src/main/java/org/cryptomator/ui/preferences/AutoStartWinStrategy.java 1
See the complete overview on Codacy |
This PR closes #1251 by implementing a fallback strategy using the autostart folder when the user enables the auto start option in cryptomator.