Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Commit

Permalink
Minor changes (#133)
Browse files Browse the repository at this point in the history
- shortened Default.cmd
- prevented annoying homegroup errors for 1803+ (counterpart for enabling not touched, cuz it's good to see the errors in this case imo)
  • Loading branch information
r3incarnat0r authored and Disassembler0 committed Sep 18, 2018
1 parent 1e977ab commit 5fae738
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 1 addition & 3 deletions Default.cmd
@@ -1,3 +1 @@
@ECHO OFF

powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Win10.ps1" -include "%~dp0Win10.psm1" -preset "%~dpn0.preset"
@powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Win10.ps1" -include "%~dp0Win10.psm1" -preset "%~dpn0.preset"
12 changes: 8 additions & 4 deletions Win10.psm1
Expand Up @@ -796,10 +796,14 @@ Function EnableUpdateRestart {
# Stop and disable Home Groups services - Not applicable to 1803 and newer or Server
Function DisableHomeGroups {
Write-Output "Stopping and disabling Home Groups services..."
Stop-Service "HomeGroupListener" -WarningAction SilentlyContinue
Set-Service "HomeGroupListener" -StartupType Disabled
Stop-Service "HomeGroupProvider" -WarningAction SilentlyContinue
Set-Service "HomeGroupProvider" -StartupType Disabled
If (Get-Service "HomeGroupListener" -ErrorAction SilentlyContinue) {
Stop-Service "HomeGroupListener" -WarningAction SilentlyContinue
Set-Service "HomeGroupListener" -StartupType Disabled
}
If (Get-Service "HomeGroupProvider" -ErrorAction SilentlyContinue) {
Stop-Service "HomeGroupProvider" -WarningAction SilentlyContinue
Set-Service "HomeGroupProvider" -StartupType Disabled
}
}

# Enable and start Home Groups services - Not applicable to 1803 and newer or Server
Expand Down

0 comments on commit 5fae738

Please sign in to comment.