瀏覽代碼

Moved the Erroraction preference to line 12

Richard Newton 7 年之前
父節點
當前提交
e9d2b48fab
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Windows10Debloater.ps1

+ 3 - 3
Windows10Debloater.ps1

@@ -8,6 +8,9 @@ If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
   Exit
 }
 
+#no errors throughout
+$ErrorActionPreference = 'silentlycontinue'
+
 If (Test-Path "C:\Windows10Debloater") {
     Write-Output "C:\Windows10Debloater exists. Skipping."
 }
@@ -19,9 +22,6 @@ Else {
 
 Start-Transcript -OutputDirectory "C:\Windows10Debloater"
 
-#no errors throughout
-$ErrorActionPreference = 'silentlycontinue'
-
 Function Start-Debloat {
     
     [CmdletBinding()]