浏览代码

Fixed CheckInstallService function

Richard Newton 6 年之前
父节点
当前提交
df471e039d
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      Windows10DebloaterGUI.ps1

+ 8 - 8
Windows10DebloaterGUI.ps1

@@ -475,10 +475,10 @@ $RemoveAllBloatware.Add_Click( {
         
         Function CheckInstallService {
   
-            If (Get-Service -Name InstallService | Where-Object ($_.Status -eq "Stopped"}) {
-            Start-Service -Name InstallService
-            Set-Service -Name InstallService -StartupType Automatic 
-            }
+            If (Get-Service -Name InstallService | Where-Object {$_.Status -eq "Stopped"}) {  
+              Start-Service -Name InstallService
+              Set-Service -Name InstallService -StartupType Automatic 
+              }
           }
   
         Write-Host "Initiating Sysprep"
@@ -720,10 +720,10 @@ $RemoveBloatNoBlacklist.Add_Click( {
         
         Function CheckInstallService {
   
-            If (Get-Service -Name InstallService | Where-Object ($_.Status -eq "Stopped"}) {
-            Start-Service -Name InstallService
-            Set-Service -Name InstallService -StartupType Automatic 
-            }
+            If (Get-Service -Name InstallService | Where-Object {$_.Status -eq "Stopped"}) {  
+              Start-Service -Name InstallService
+              Set-Service -Name InstallService -StartupType Automatic 
+              }
           }
           
         Begin-SysPrep