Minor changes (#133)

- 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)
This commit is contained in:
r3incarnat0r
2018-09-18 14:06:57 +02:00
committed by Disassembler0
parent 1e977ab95f
commit 5fae7389e1
2 changed files with 9 additions and 7 deletions

View File

@@ -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"

View File

@@ -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