diff --git a/.github/workflows/Push_Chocolatey.yml b/.github/workflows/Push_Chocolatey.yml index 57291535..f18d401f 100644 --- a/.github/workflows/Push_Chocolatey.yml +++ b/.github/workflows/Push_Chocolatey.yml @@ -12,10 +12,6 @@ jobs: uses: actions/checkout@main - name: Getting hashes - run: | - . "Scripts\Chocolatey.ps1" - - - name: Pack and push to Chocolatey run: | # https://github.com/farag2/Sophia-Script-for-Windows/blob/master/SHA256SUM.json $Parameters = @{ @@ -43,6 +39,8 @@ jobs: -replace "Hash_Sophia_Script_Wrapper", $SHA256SUM."Sophia.Script.Wrapper.v$($Latest_Release.Sophia_Script_Wrapper).zip" } | Set-Content -Path "chocolatey\tools\chocolateyinstall.ps1" -Encoding utf8 -Force + - name: Pack and push to Chocolatey + run: | choco pack chocolatey\sophia.nuspec --outputdirectory chocolatey choco apikey --key ${{ secrets.CHOCOLATEY_SECRET }} --source https://push.chocolatey.org/ [xml]$Version = Get-Content -Path chocolatey\sophia.nuspec diff --git a/.github/workflows/Sophia.yml b/.github/workflows/Sophia.yml index 8b3b7522..c4728ed7 100644 --- a/.github/workflows/Sophia.yml +++ b/.github/workflows/Sophia.yml @@ -91,5 +91,4 @@ jobs: # Use "/" in path to files files: | Sophia*.zip - chocolatey/tools/chocolateyinstall.ps1 body_path: ${{ steps.read_release.outputs.ReleaseBody }} diff --git a/SHA256SUM.json b/SHA256SUM.json index ff20b897..eb7b620a 100644 --- a/SHA256SUM.json +++ b/SHA256SUM.json @@ -1,10 +1,10 @@ { - "Sophia.Script.Wrapper.v2.7.13.zip": "F733AA3943B7E5AB63FE8AC891072A79CE4CFB6BCE1586BAAEFABEBDF08CF413", - "Sophia.Script.for.Windows.10.v5.20.5.zip": "830CDCAC6B961900EA3D21C9CCCA5CF1E42E70424D9252EE69DF762C436086A3", - "Sophia.Script.for.Windows.11.PowerShell.7.v6.8.5.zip": "40596D55844028B51917F6EC20160348FCAC805C779DE1A7FC61B6F9B9A212ED", - "Sophia.Script.for.Windows.10.LTSC.2021.v5.20.5.zip": "616A833797A9D16F78E702F511182038FE4836B9976352BF116EF6FCD21C5270", - "Sophia.Script.for.Windows.10.LTSC.2019.v5.10.5.zip": "4F3827A9A02A343FCD4AC3B8E10BF5C23AA72590BD8FB8D23FA616A894CCC135", - "Sophia.Script.for.Windows.10.PowerShell.7.v5.20.5.zip": "8058126976E37B30C7EB21F8324A8F59A9F3FF9287080029F20D15D0BB4DE94F", - "Sophia.Script.for.Windows.11.LTSC.2024.v6.8.5.zip": "B73933D20A9BDCAA2613381FBA156AE699BC07965456AE33654241A9766BD0EF", - "Sophia.Script.for.Windows.11.v6.8.5.zip": "ACB9CB0F9ED11A3DDCA871CE87E7C11D1029B1C01FCB9626296AA84A1439A4D7" + "Sophia.Script.for.Windows.11.v6.8.5.zip": "633707D1A3A860F204F9D9C807393E748C22F7F43DC6138C21C6C7F294972F53", + "Sophia.Script.for.Windows.10.PowerShell.7.v5.20.5.zip": "80E14398238041CC16B015855C95489DF744A0A591505DACCD3CBC018146E213", + "Sophia.Script.for.Windows.10.v5.20.5.zip": "0B34071DDE17B7CDE01198E815C089B308B90F73929CA8D1E6A0FE27E4453099", + "Sophia.Script.for.Windows.11.PowerShell.7.v6.8.5.zip": "C2F94CC4E271A5DF6F70A4A460883DB5F94AB34A7FE57A51C3B23CDC873AF8C6", + "Sophia.Script.for.Windows.11.LTSC.2024.v6.8.5.zip": "5CEC932D95102DECD2529EAB6B11B6810E229A86715ED26493FF473920769F37", + "Sophia.Script.Wrapper.v2.7.13.zip": "44911881E606378F70FE772DA94F2664E5E37C7DBD7E9BFB010DE962570A3C0F", + "Sophia.Script.for.Windows.10.LTSC.2019.v5.10.5.zip": "7E7ECFB7C26791174C2EF797AB213927C8A258285770744BAB381BFDD5266290", + "Sophia.Script.for.Windows.10.LTSC.2021.v5.20.5.zip": "9C238E9278CA5B0EC9854E869CA832BED7CEB87E4418BB2DE12A48701E2BA07F" } diff --git a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 index ea94f6ae..5546008b 100644 --- a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 @@ -526,6 +526,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); # Check Windows default antivirus try { + $Script:DefenderDefaultAV = $false + $productState = (Get-CimInstance -ClassName AntiVirusProduct -Namespace root/SecurityCenter2 | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState $DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2) # Defender is a currently used AV. Continue... diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 index c9f32c0f..f69a5cab 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1 @@ -498,6 +498,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); # Check Windows default antivirus try { + $Script:DefenderDefaultAV = $false + $productState = (Get-CimInstance -ClassName AntiVirusProduct -Namespace root/SecurityCenter2 | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState $DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2) # Defender is a currently used AV. Continue... diff --git a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 index 490ca310..dc9a1304 100644 --- a/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1 @@ -498,6 +498,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); # Check Windows default antivirus try { + $Script:DefenderDefaultAV = $false + $productState = (Get-CimInstance -ClassName AntiVirusProduct -Namespace root/SecurityCenter2 | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState $DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2) # Defender is a currently used AV. Continue... diff --git a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 index dc8849fb..a507a672 100644 --- a/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1 @@ -553,6 +553,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); # Check Windows default antivirus try { + $Script:DefenderDefaultAV = $false + $productState = (Get-CimInstance -ClassName AntiVirusProduct -Namespace root/SecurityCenter2 | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState $DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2) # Defender is a currently used AV. Continue... diff --git a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 index 726538ee..1ea45005 100644 --- a/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11/Module/Sophia.psm1 @@ -513,6 +513,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); # Check Windows default antivirus try { + $Script:DefenderDefaultAV = $false + $productState = (Get-CimInstance -ClassName AntiVirusProduct -Namespace root/SecurityCenter2 | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState $DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2) # Defender is a currently used AV. Continue... diff --git a/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 index 0261f890..0eba6391 100644 --- a/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1 @@ -499,6 +499,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); # Check Windows default antivirus try { + $Script:DefenderDefaultAV = $false + $productState = (Get-CimInstance -ClassName AntiVirusProduct -Namespace root/SecurityCenter2 | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState $DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2) # Defender is a currently used AV. Continue... diff --git a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 index 1c2a4e31..c4b42c7c 100644 --- a/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1 @@ -540,6 +540,8 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); # Check Windows default antivirus try { + $Script:DefenderDefaultAV = $false + $productState = (Get-CimInstance -ClassName AntiVirusProduct -Namespace root/SecurityCenter2 | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState $DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2) # Defender is a currently used AV. Continue...