-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove OneDrive from navigation pane #2691
base: main
Are you sure you want to change the base?
Conversation
Added an option to remove onedrive from the navigation pane
I noticed a mistake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @BenignPigeon, thanks for the commit.
There are some syntax errors with the logic you provided, because the script is saved in json, meaning we have to escape " correctly. Else it will think the string ends there even tho it does not and that creates a chain reaction. To fix that we put \ before the " to escape it.
will post a fixed snippet soon
EDIT:
here the correctly escaped invoke- & undoscript:
"InvokeScript": [
"
REG ADD \"HKEY_CLASSES_ROOT\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" /f /v \"System.IsPinnedToNameSpaceTree\" /t REG_DWORD /d \"0\"
REG ADD \"HKEY_CURRENT_USER\\Software\\Classes\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" /f /v \"System.IsPinnedToNameSpaceTree\" /t REG_DWORD /d \"0\"
REG ADD \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" /f /v \"HiddenByDefault\" /t REG_DWORD /d \"1\"
REG ADD \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\NonEnum\" /f /v \"{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" /t REG_DWORD /d \"1\"
"
],
"UndoScript": [
"
REG ADD \"HKEY_CLASSES_ROOT\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" /f /v \"System.IsPinnedToNameSpaceTree\" /t REG_DWORD /d \"1\"
REG ADD \"HKEY_CURRENT_USER\\Software\\Classes\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" /f /v \"System.IsPinnedToNameSpaceTree\" /t REG_DWORD /d \"1\"
REG DELETE \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" /v \"HiddenByDefault\" /f
REG DELETE \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\NonEnum\" /v \"{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" /f
"
],
Thank you so much @MyDrift-user for the feedback. In regards to your query:
These registry tweaks only remove the onedrive shortcut at the top [underneath home and gallery] from the navigation pane. This does not remove/unlink onedrive shortcuts e.g. the documents, pictures folders from OneDrive. I'll attach some pictures of what I mean. Without running remove home and gallery, and my shortcut, this is what it looks like: Notice how this pc isn't at the top. After running the tweak "remove home and gallery" in winutil, the onedrive personal shortcut still remains after: However after running both the winutil "remove home and gallery" as well as my registry edits provided in this pull request, none of those remain and this pc is at the top. These registry edits don't remove any onedrive functionality as you can still access all the folders. e.g. The downloads and desktop shortcuts there still link to the ones stored in onedrive. This really is just to make This PC be the first result without there being any other clutter at the top. |
Fixed syntax errors thanks to @MyDrift-user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this an invoke script when these are registry changes?
Pull Request - Tweak to Remove OneDrive from navigation pane
Type of Change
Description
Added an option to remove onedrive from the navigation pane [below home and gallery] without removing OneDrive from the computer. The reason why I thought why this should be there is since there's an option to remove Home and Gallery in the tweaks section but not to remove the annoying OneDrive - Personal shortcut. This means that This PC isn't the first result.
Image of what I mean
Testing
This was just a simple addition so the testing was to make sure that all the changes to the registry were correct, and that reverting the tweak worked properly.Impact
N/A since it's just a registry tweak that alters the navigation pane.Issue related to PR
Additional Information
I wasn't sure where the "link" section should go to, so I linked it to the same page as the Home/Gallery Removal
Since I'm rather new to this and would like to contribute a bit more to FOSS, I'd appreciate any feedback of what I may have done incorrectly so I can improve. Thanks (:
Checklist