Browse Source

Moved the Erroraction preference to line 12

Richard Newton 7 years ago
parent
commit
e9d2b48fab
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Windows10Debloater.ps1

+ 3 - 3
Windows10Debloater.ps1

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