@ -708,14 +708,14 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
# Checking whether all necessary files exist in the script folder
# Checking whether all necessary files exist in the script folder
$Files = @ (
$Files = @ (
" $ PSScriptRoot\..\bin \LGPO.exe " ,
" $ PSScriptRoot\..\Binaries \LGPO.exe " ,
" $ PSScriptRoot\..\bin \Microsoft.Windows.SDK.NET.dll " ,
" $ PSScriptRoot\..\Binaries \Microsoft.Windows.SDK.NET.dll " ,
" $ PSScriptRoot\..\bin \WinRT.Runtime.dll "
" $ PSScriptRoot\..\Binaries \WinRT.Runtime.dll "
)
)
if ( ( $Files | Test-Path ) -contains $false )
if ( ( $Files | Test-Path ) -contains $false )
{
{
Write-Information -MessageData " " -InformationAction Continue
Write-Information -MessageData " " -InformationAction Continue
Write-Warning -Message ( $Localization . Bin -f [IO.Path] :: GetFullPath ( " $ PSScriptRoot\..\bin " ) )
Write-Warning -Message ( $Localization . Bin -f [IO.Path] :: GetFullPath ( " $ PSScriptRoot\..\Binaries " ) )
Write-Information -MessageData " " -InformationAction Continue
Write-Information -MessageData " " -InformationAction Continue
Write-Verbose -Message " https://github.com/farag2/Sophia-Script-for-Windows/releases/latest " -Verbose
Write-Verbose -Message " https://github.com/farag2/Sophia-Script-for-Windows/releases/latest " -Verbose
@ -4629,38 +4629,38 @@ function NavigationPaneExpand
. SYNOPSIS
. SYNOPSIS
Recommended section in Start Menu
Recommended section in Start Menu
. PARAMETER Enabl e
. PARAMETER Hid e
Remove Recommended section in Start Menu
Remove Recommended section in Start Menu
. PARAMETER Disable
. PARAMETER Show
Do not remove Recommended section in Start Menu ( default value )
Do not remove Recommended section in Start Menu ( default value )
. EXAMPLE
. EXAMPLE
HideRecommendedSection -Enabl e
StartRecommendedSection -Hid e
. EXAMPLE
. EXAMPLE
HideRecommendedSection -Disable
StartRecommendedSection -Show
. NOTES
. NOTES
Current user
Current user
#>
#>
function Hide RecommendedSection
function Start RecommendedSection
{
{
param
param
(
(
[ Parameter (
[ Parameter (
Mandatory = $true ,
Mandatory = $true ,
ParameterSetName = " Enabl e"
ParameterSetName = " Hid e"
) ]
) ]
[switch]
[switch]
$Enabl e ,
$Hid e ,
[ Parameter (
[ Parameter (
Mandatory = $true ,
Mandatory = $true ,
ParameterSetName = " Disable "
ParameterSetName = " Show "
) ]
) ]
[switch]
[switch]
$Disable
$Show
)
)
# Windows 11 IoT Enterprise not supported
# Windows 11 IoT Enterprise not supported
@ -4680,7 +4680,7 @@ function HideRecommendedSection
switch ( $PSCmdlet . ParameterSetName )
switch ( $PSCmdlet . ParameterSetName )
{
{
" Enabl e"
" Hid e"
{
{
if ( -not ( Test-Path -Path HKCU : \ Software \ Policies \ Microsoft \ Windows \ Explorer ) )
if ( -not ( Test-Path -Path HKCU : \ Software \ Policies \ Microsoft \ Windows \ Explorer ) )
{
{
@ -4690,7 +4690,7 @@ function HideRecommendedSection
Set-Policy -Scope User -Path SOFTWARE \ Policies \ Microsoft \ Windows \ Explorer -Name HideRecommendedSection -Type DWORD -Value 1
Set-Policy -Scope User -Path SOFTWARE \ Policies \ Microsoft \ Windows \ Explorer -Name HideRecommendedSection -Type DWORD -Value 1
}
}
" Disable "
" Show "
{
{
Remove-ItemProperty -Path HKCU : \ Software \ Policies \ Microsoft \ Windows \ Explorer -Name HideRecommendedSection -Force -ErrorAction Ignore
Remove-ItemProperty -Path HKCU : \ Software \ Policies \ Microsoft \ Windows \ Explorer -Name HideRecommendedSection -Force -ErrorAction Ignore
Set-Policy -Scope User -Path SOFTWARE \ Policies \ Microsoft \ Windows \ Explorer -Name HideRecommendedSection -Type CLEAR
Set-Policy -Scope User -Path SOFTWARE \ Policies \ Microsoft \ Windows \ Explorer -Name HideRecommendedSection -Type CLEAR
@ -10351,8 +10351,8 @@ function UninstallUWPApps
$ForAllUsers
$ForAllUsers
)
)
Add-Type -AssemblyName " $ PSScriptRoot\..\bin \WinRT.Runtime.dll "
Add-Type -AssemblyName " $ PSScriptRoot\..\Binaries \WinRT.Runtime.dll "
Add-Type -AssemblyName " $ PSScriptRoot\..\bin \Microsoft.Windows.SDK.NET.dll "
Add-Type -AssemblyName " $ PSScriptRoot\..\Binaries \Microsoft.Windows.SDK.NET.dll "
Add-Type -AssemblyName PresentationCore , PresentationFramework
Add-Type -AssemblyName PresentationCore , PresentationFramework
@ -14152,11 +14152,11 @@ public static void PostMessage()
{
{
if ( Test-Path -Path " $ env:TEMP\Computer.txt " )
if ( Test-Path -Path " $ env:TEMP\Computer.txt " )
{
{
& " $ PSScriptRoot\..\bin \LGPO.exe " / t " $ env:TEMP\Computer.txt "
& " $ PSScriptRoot\..\Binaries \LGPO.exe " / t " $ env:TEMP\Computer.txt "
}
}
if ( Test-Path -Path " $ env:TEMP\User.txt " )
if ( Test-Path -Path " $ env:TEMP\User.txt " )
{
{
& " $ PSScriptRoot\..\bin \LGPO.exe " / t " $ env:TEMP\User.txt "
& " $ PSScriptRoot\..\Binaries \LGPO.exe " / t " $ env:TEMP\User.txt "
}
}
gpupdate / force
gpupdate / force
@ -14230,8 +14230,8 @@ public static void PostMessage()
# Determines whether the app can be seen in Settings where the user can turn notifications on or off
# 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
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\..\Binaries \WinRT.Runtime.dll "
Add-Type -AssemblyName " $ PSScriptRoot\..\bin \Microsoft.Windows.SDK.NET.dll "
Add-Type -AssemblyName " $ PSScriptRoot\..\Binaries \Microsoft.Windows.SDK.NET.dll "
# Telegram group
# Telegram group
# Extract the localized "Open" string from shell32.dll
# Extract the localized "Open" string from shell32.dll