Browse Source

Improved Checks

removed extra space
pull/469/head
Dmitry Nefedov 1 year ago
parent
commit
e6b0ed7318
  1. 3
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  2. 11
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  3. 3
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  4. 12
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

3
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -14785,6 +14785,9 @@ public static void PostMessage()
$ToastMessage = [Windows.UI.Notifications.ToastNotification]::New($ToastXML)
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("Sophia").Show($ToastMessage)
#endregion Toast notifications
# Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
}
#endregion Post Actions

11
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -186,7 +186,13 @@ function Checks
}
# Check whether LGPO.exe exists in the bin folder
if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe"))
# Check whether all necessary files exist in the bin folder
$Files = @(
"$PSScriptRoot\..\bin\LGPO.exe",
"$PSScriptRoot\..\bin\Microsoft.Windows.SDK.NET.dll",
"$PSScriptRoot\..\bin\WinRT.Runtime.dll"
)
if (($Files | Test-Path) -contains $false)
{
Write-Warning -Message $Localization.Bin
Start-Sleep -Seconds 5
@ -14813,6 +14819,9 @@ public static void PostMessage()
# PowerShell 7.3 doesn't support yet using own caller app toast notifications. Fixed in PowerShell 7.4.0-preview.1
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier().Show($ToastMessage)
#endregion Toast notifications
# Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
}
#endregion Post Actions

3
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -14193,6 +14193,9 @@ public static void PostMessage()
$ToastMessage = [Windows.UI.Notifications.ToastNotification]::New($ToastXML)
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("Sophia").Show($ToastMessage)
#endregion Toast notifications
# Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
}
#endregion Post Actions

12
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -276,8 +276,13 @@ function Checks
exit
}
# Check whether LGPO.exe exists in the bin folder
if (-not (Test-Path -Path "$PSScriptRoot\..\bin\LGPO.exe"))
# Check whether all necessary files exist in the bin folder
$Files = @(
"$PSScriptRoot\..\bin\LGPO.exe",
"$PSScriptRoot\..\bin\Microsoft.Windows.SDK.NET.dll",
"$PSScriptRoot\..\bin\WinRT.Runtime.dll"
)
if (($Files | Test-Path) -contains $false)
{
Write-Warning -Message $Localization.Bin
Start-Sleep -Seconds 5
@ -14215,6 +14220,9 @@ public static void PostMessage()
# PowerShell 7.3 doesn't support yet using own caller app toast notifications. Fixed in PowerShell 7.4.0-preview.1
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier().Show($ToastMessage)
#endregion Toast notifications
# Check for UWP apps updates
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
}
#endregion Post Actions

Loading…
Cancel
Save