Skip to content

Commit

Permalink
fix: toggle 'Give access to' context menu (#1146)
Browse files Browse the repository at this point in the history
Co-authored-by: he3als <[email protected]>
  • Loading branch information
nicklvh and he3als authored Jul 13, 2024
1 parent d434dd6 commit 5ddda43
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/playbook/Configuration/tweaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ actions:
# -------------------------------------------------------------------------- #
- !task: {path: 'tweaks\qol\explorer\remove-context-menus\cast-to-device.yml'}
- !task: {path: 'tweaks\qol\explorer\remove-context-menus\extract-all.yml'}
- !task: {path: 'tweaks\qol\explorer\remove-context-menus\give-access-to.yml'}
- !task: {path: 'tweaks\qol\explorer\remove-context-menus\include-in-library.yml'}
- !task: {path: 'tweaks\qol\explorer\remove-context-menus\new-bitmap.yml'}
- !task: {path: 'tweaks\qol\explorer\remove-context-menus\new-rtf.yml'}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\Sharing]

[-HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\Sharing]

[-HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\Sharing]

[-HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\Sharing]

[-HKEY_CLASSES_ROOT\LibraryFolder\background\shellex\ContextMenuHandlers\Sharing]

[-HKEY_CLASSES_ROOT\UserLibraryFolder\shellex\ContextMenuHandlers\Sharing]
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ param (
[switch]$Silent
)

$networkDiscoveryConfigPath = "$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\6. Advanced Configuration\Services\Network Discovery"
$fileSharingConfigPath = "$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\3. General Configuration\File Sharing"

# Disable network items
Expand Down Expand Up @@ -32,6 +33,8 @@ Get-NetFirewallRule | Where-Object {

reg import "$networkDiscoveryConfigPath\Network Navigation Pane\Disable Network Navigation Pane (default).reg" | Out-Null

reg import "$fileSharingConfigPath\Give Access To Menu\Give Access To Menu Disable (default).reg" | Out-Null

if ($Silent) { exit }

Write-Host "Completed!" -ForegroundColor Green
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ if ($LASTEXITCODE -eq 1) {
reg import "$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\3. General Configuration\File Sharing\Network Navigation Pane\User Network Navigation Pane choice.reg" | Out-Null
}

choice /c:yn /n /m "Would you like to restore the 'Give access to' context menu in Explorer? [Y/N] "
if ($LASTEXITCODE -eq 1) {
reg import "$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\3. General Configuration\File Sharing\Give Access To Menu\Give Access To Menu Enable.reg" | Out-Null
}

Write-Host "Completed!" -ForegroundColor Green
Write-Host "Press any key to exit... " -NoNewLine
$Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') | Out-Null
Expand Down

0 comments on commit 5ddda43

Please sign in to comment.