Skip to content

Commit 328eb74

Browse files
committed
fix(file sharing): various improvements
- non-english locale support - restart notice - advanced sharing settings shortcut - enable sharing wizard
1 parent ee85548 commit 328eb74

File tree

6 files changed

+27
-19
lines changed

6 files changed

+27
-19
lines changed

src/playbook/Configuration/atlas/services.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ actions:
2626
command: '.\AtlasModules\Scripts\ScriptWrappers\DisableFileSharing.ps1 -Silent'
2727
exeDir: true
2828
wait: true
29+
runas: currentUserElevated
2930

3031
- !writeStatus: {status: 'Disabling Location'}
3132
- !cmd:

src/playbook/Configuration/tweaks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ actions:
167167
- !task: {path: 'tweaks\qol\disable-screen-capture-hotkey.yml', option: 'remove-snipping-tool'}
168168
- !task: {path: 'tweaks\qol\disable-dynamic-lighting.yml'}
169169
- !task: {path: 'tweaks\qol\disable-auto-app-archival.yml'}
170+
- !task: {path: 'tweaks\qol\add-sharing-settings-shortcut.yml'}
170171

171172
# -------------------------------------------------------------------------- #
172173
# qol\appearance #
@@ -202,7 +203,6 @@ actions:
202203
- !task: {path: 'tweaks\qol\explorer\disable-check-boxes.yml'}
203204
- !task: {path: 'tweaks\qol\explorer\disable-folders-this-pc.yml'}
204205
- !task: {path: 'tweaks\qol\explorer\disable-network-navigation-pane.yml'}
205-
- !task: {path: 'tweaks\qol\explorer\disable-sharing-wizard.yml'}
206206
- !task: {path: 'tweaks\qol\explorer\full-context-on-more-than-15-items.yml'}
207207
- !task: {path: 'tweaks\qol\explorer\hide-frequently-used-items.yml'}
208208
- !task: {path: 'tweaks\qol\explorer\import-power-plan.yml'}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Add Network Sharing Shortcut
3+
description: Adds a network sharing settings shortcut to the Atlas 'File Sharing' folder for QoL
4+
actions:
5+
- !powerShell:
6+
command: |
7+
.\AtlasModules\initPowerShell.ps1
8+
New-Shortcut -Source 'control.exe' `
9+
-Destination """$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\3. General Configuration\File Sharing\Sharing Settings.lnk""" `
10+
-Arguments '/name Microsoft.NetworkAndSharingCenter /page Advanced'
11+
exeDir: true
12+
wait: true

src/playbook/Configuration/tweaks/qol/explorer/disable-sharing-wizard.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/DisableFileSharing.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ foreach ($profile in $profiles) {
2525
}
2626

2727
# Disable network discovery firewall rules
28-
Get-NetFirewallRule | Where-Object {
28+
Get-NetFirewallRule | Where-Object {
29+
# File and Printer Sharing, Network Discovery
30+
($_.Group -eq "@FirewallAPI.dll,-28502" -or $_.Group -eq "@FirewallAPI.dll,-32752") -or
2931
($_.DisplayGroup -eq "File and Printer Sharing" -or $_.DisplayGroup -eq "Network Discovery") -and
3032
$_.Profile -like "*Private*"
3133
} | Disable-NetFirewallRule
@@ -35,7 +37,7 @@ reg import "$fileSharingConfigPath\Give Access To Menu\Disable Give Access To Me
3537

3638
if ($Silent) { exit }
3739

38-
Write-Host "`nCompleted!" -ForegroundColor Green
39-
Write-Host "Press any key to exit... " -NoNewLine
40-
$Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') | Out-Null
40+
Write-Host "`nCompleted! " -ForegroundColor Green -NoNewLine
41+
Write-Host "You'll need to restart to apply the changes." -ForegroundColor Yellow
42+
$null = Read-Host "Press Enter to exit..."
4143
exit

src/playbook/Executables/AtlasModules/Scripts/ScriptWrappers/EnableFileSharing.ps1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ if ($LASTEXITCODE -eq 1) {
2525
Set-ItemProperty -Path $profile.PSPath -Name "Category" -Value 1 | Out-Null
2626
}
2727

28-
# Enable network discovery firewall rules
29-
Get-NetFirewallRule | Where-Object {
28+
# Disable network discovery firewall rules
29+
Get-NetFirewallRule | Where-Object {
30+
# File and Printer Sharing, Network Discovery
31+
($_.Group -eq "@FirewallAPI.dll,-28502" -or $_.Group -eq "@FirewallAPI.dll,-32752") -or
3032
($_.DisplayGroup -eq "File and Printer Sharing" -or $_.DisplayGroup -eq "Network Discovery") -and
3133
$_.Profile -like "*Private*"
3234
} | Enable-NetFirewallRule
@@ -46,7 +48,7 @@ if ($LASTEXITCODE -eq 1) {
4648
reg import "$([Environment]::GetFolderPath('Windows'))\AtlasDesktop\3. General Configuration\File Sharing\Give Access To Menu\Enable Give Access To Menu.reg" | Out-Null
4749
}
4850

49-
Write-Host "`nCompleted!" -ForegroundColor Green
50-
Write-Host "Press any key to exit... " -NoNewLine
51-
$Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') | Out-Null
51+
Write-Host "`nCompleted! " -ForegroundColor Green -NoNewLine
52+
Write-Host "You'll need to restart to apply the changes." -ForegroundColor Yellow
53+
$null = Read-Host "Press Enter to exit..."
5254
exit

0 commit comments

Comments
 (0)