From e42b1a465390b4094773c0331704e9be9736b38e Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Wed, 22 Feb 2023 22:16:39 +0300 Subject: [PATCH] #453 --- .../Module/Sophia.psm1 | 3 +++ .../Module/Sophia.psm1 | 3 +++ 2 files changed, 6 insertions(+) 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 3a8f2ce3..f63f98b7 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 @@ -14314,6 +14314,9 @@ public static void PostMessage() # Determines whether the app can be seen in Settings where the user can turn notifications on or off New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\AppUserModelId\Sophia -Name ShowInSettings -Value 0 -PropertyType DWord -Force + Add-Type -AssemblyName "$PSScriptRoot\..\bin\WinRT.Runtime.dll" + Add-Type -AssemblyName "$PSScriptRoot\..\bin\Microsoft.Windows.SDK.NET.dll" + # Apply policies found in registry to re-build database database due to gpedit.msc relies in its' own database if ((Test-Path -Path "$env:TEMP\Computer.txt") -or (Test-Path -Path "$env:TEMP\User.txt")) { 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 68332344..88f695c9 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 @@ -13692,6 +13692,9 @@ public static void PostMessage() # Determines whether the app can be seen in Settings where the user can turn notifications on or off New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\AppUserModelId\Sophia -Name ShowInSettings -Value 0 -PropertyType DWord -Force + Add-Type -AssemblyName "$PSScriptRoot\..\bin\WinRT.Runtime.dll" + Add-Type -AssemblyName "$PSScriptRoot\..\bin\Microsoft.Windows.SDK.NET.dll" + # Apply policies found in registry to re-build database database due to gpedit.msc relies in its' own database if ((Test-Path -Path "$env:TEMP\Computer.txt") -or (Test-Path -Path "$env:TEMP\User.txt")) {