Browse Source

fixed typos

master
Dmitry Nefedov 1 year ago
parent
commit
ae4dcbf5c6
  1. 8
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  2. 7
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  3. 7
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  4. 8
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  5. 16
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  6. 4
      src/Sophia_Script_for_Windows_11/Sophia.ps1
  7. 21
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1
  8. 4
      src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

8
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -783,6 +783,7 @@ public static string GetString(uint strId)
# Split the Array variable content
$IPArray = $IPArray -split "`r?`n" | Where-Object -FilterScript {$_ -notmatch "#"}
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
@ -6846,6 +6847,7 @@ function NetworkAdaptersSavePower
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Start-Sleep -Seconds 2
}
}
@ -7248,7 +7250,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
(Get-Item -Path "$FolderPath\desktop.ini" -Force).Attributes = "Hidden", "System", "Archive"
(Get-Item -Path "$FolderPath\desktop.ini" -Force).Refresh()
if ((Get-ChildItem -Path $CurrentUserFolderPath | Measure-Object).Count -ne 0)
if ((Get-ChildItem -Path $CurrentUserFolderPath -ErrorAction Ignore | Measure-Object).Count -ne 0)
{
Write-Error -Message ($Localization.UserShellFolderNotEmpty -f $CurrentUserFolderPath) -ErrorAction SilentlyContinue
}
@ -9967,7 +9969,7 @@ function InstallVCRedist
if ([System.Version](Get-AppxPackage -Name Microsoft.DesktopAppInstaller -ErrorAction Ignore).Version -ge [System.Version]"1.17")
{
# https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Microsoft/VCRedist/2015%2B
winget install --id=Microsoft.VCRedist.2015+.x86 --exact --accept-source-agreements
winget install --id=Microsoft.VCRedist.2015+.x86 --exact --force --accept-source-agreements
winget install --id=Microsoft.VCRedist.2015+.x64 --exact --force --accept-source-agreements
# PowerShell 5.1 (7.3 too) interprets 8.3 file name literally, if an environment variable contains a non-latin word
@ -15083,6 +15085,7 @@ function UpdateLGPEPolicies
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Verbose -Message HKLM -Verbose
Write-Information -MessageData "" -InformationAction Continue
@ -15451,6 +15454,7 @@ public static void PostMessage()
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
}
#endregion Post Actions

7
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -646,6 +646,7 @@ public static string GetString(uint strId)
# Split the Array variable content
$IPArray = $IPArray -split "`r?`n" | Where-Object -FilterScript {$_ -notmatch "#"}
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
@ -5486,6 +5487,7 @@ function NetworkAdaptersSavePower
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Start-Sleep -Seconds 2
}
}
@ -5888,7 +5890,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
(Get-Item -Path "$FolderPath\desktop.ini" -Force).Attributes = "Hidden", "System", "Archive"
(Get-Item -Path "$FolderPath\desktop.ini" -Force).Refresh()
if ((Get-ChildItem -Path $CurrentUserFolderPath | Measure-Object).Count -ne 0)
if ((Get-ChildItem -Path $CurrentUserFolderPath -ErrorAction Ignore | Measure-Object).Count -ne 0)
{
Write-Error -Message ($Localization.UserShellFolderNotEmpty -f $CurrentUserFolderPath) -ErrorAction SilentlyContinue
}
@ -8266,7 +8268,7 @@ function InstallVCRedist
if ([System.Version](Get-AppxPackage -Name Microsoft.DesktopAppInstaller -ErrorAction Ignore).Version -ge [System.Version]"1.17")
{
# https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Microsoft/VCRedist/2015%2B
winget install --id=Microsoft.VCRedist.2015+.x86 --exact --accept-source-agreements
winget install --id=Microsoft.VCRedist.2015+.x86 --exact --force --accept-source-agreements
winget install --id=Microsoft.VCRedist.2015+.x64 --exact --force --accept-source-agreements
# PowerShell 5.1 (7.3 too) interprets 8.3 file name literally, if an environment variable contains a non-latin word
@ -11459,6 +11461,7 @@ function UpdateLGPEPolicies
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Verbose -Message HKLM -Verbose
Write-Information -MessageData "" -InformationAction Continue

7
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -646,6 +646,7 @@ public static string GetString(uint strId)
# Split the Array variable content
$IPArray = $IPArray -split "`r?`n" | Where-Object -FilterScript {$_ -notmatch "#"}
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
@ -5872,6 +5873,7 @@ function NetworkAdaptersSavePower
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Start-Sleep -Seconds 2
}
}
@ -6274,7 +6276,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
(Get-Item -Path "$FolderPath\desktop.ini" -Force).Attributes = "Hidden", "System", "Archive"
(Get-Item -Path "$FolderPath\desktop.ini" -Force).Refresh()
if ((Get-ChildItem -Path $CurrentUserFolderPath | Measure-Object).Count -ne 0)
if ((Get-ChildItem -Path $CurrentUserFolderPath -ErrorAction Ignore | Measure-Object).Count -ne 0)
{
Write-Error -Message ($Localization.UserShellFolderNotEmpty -f $CurrentUserFolderPath) -ErrorAction SilentlyContinue
}
@ -8890,7 +8892,7 @@ function InstallVCRedist
if ([System.Version](Get-AppxPackage -Name Microsoft.DesktopAppInstaller -ErrorAction Ignore).Version -ge [System.Version]"1.17")
{
# https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Microsoft/VCRedist/2015%2B
winget install --id=Microsoft.VCRedist.2015+.x86 --exact --accept-source-agreements
winget install --id=Microsoft.VCRedist.2015+.x86 --exact --force --accept-source-agreements
winget install --id=Microsoft.VCRedist.2015+.x64 --exact --force --accept-source-agreements
# PowerShell 5.1 (7.3 too) interprets 8.3 file name literally, if an environment variable contains a non-latin word
@ -12628,6 +12630,7 @@ function UpdateLGPEPolicies
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Verbose -Message HKLM -Verbose
Write-Information -MessageData "" -InformationAction Continue

8
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -784,6 +784,7 @@ public static string GetString(uint strId)
# Split the Array variable content
$IPArray = $IPArray -split "`r?`n" | Where-Object -FilterScript {$_ -notmatch "#"}
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
@ -6851,6 +6852,7 @@ function NetworkAdaptersSavePower
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Start-Sleep -Seconds 2
}
}
@ -7253,7 +7255,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
(Get-Item -Path "$FolderPath\desktop.ini" -Force).Attributes = "Hidden", "System", "Archive"
(Get-Item -Path "$FolderPath\desktop.ini" -Force).Refresh()
if ((Get-ChildItem -Path $CurrentUserFolderPath | Measure-Object).Count -ne 0)
if ((Get-ChildItem -Path $CurrentUserFolderPath -ErrorAction Ignore | Measure-Object).Count -ne 0)
{
Write-Error -Message ($Localization.UserShellFolderNotEmpty -f $CurrentUserFolderPath) -ErrorAction SilentlyContinue
}
@ -9972,7 +9974,7 @@ function InstallVCRedist
if ([System.Version](Get-AppxPackage -Name Microsoft.DesktopAppInstaller -ErrorAction Ignore).Version -ge [System.Version]"1.17")
{
# https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Microsoft/VCRedist/2015%2B
winget install --id=Microsoft.VCRedist.2015+.x86 --exact --accept-source-agreements
winget install --id=Microsoft.VCRedist.2015+.x86 --exact --force --accept-source-agreements
winget install --id=Microsoft.VCRedist.2015+.x64 --exact --force --accept-source-agreements
# PowerShell 5.1 (7.3 too) interprets 8.3 file name literally, if an environment variable contains a non-latin word
@ -15110,6 +15112,7 @@ function UpdateLGPEPolicies
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Verbose -Message HKLM -Verbose
Write-Information -MessageData "" -InformationAction Continue
@ -15478,6 +15481,7 @@ public static void PostMessage()
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
}
#endregion Post Actions

16
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -835,6 +835,7 @@ public static string GetString(uint strId)
# Split the Array variable content
$IPArray = $IPArray -split "`r?`n" | Where-Object -FilterScript {$_ -notmatch "#"}
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
@ -1540,7 +1541,7 @@ function ScheduledTasks
# The following tasks will have their checkboxes checked
[string[]]$CheckedScheduledTasks = @(
# Collects program telemetry information if opted-in to the Microsoft Customer Experience Improvement Program
"Microsoft Compatibility Appraiser", ###
"Microsoft Compatibility Appraiser",
# This task collects and uploads autochk SQM data if opted-in to the Microsoft Customer Experience Improvement Program
"Proxy",
@ -2384,6 +2385,9 @@ function BingSearch
.EXAMPLE
BrowsingHistory -Show
.NOTES
Windows 11 build 23451 (Dev) required
.NOTES
Current user
#>
@ -2406,7 +2410,7 @@ function BrowsingHistory
$Show
)
if ((Get-CimInstance -ClassName CIM_OperatingSystem).BuildNumber -lt 23451) ### c:\vivetool\vivetool.exe /enable /id:42905461
if ((Get-CimInstance -ClassName CIM_OperatingSystem).BuildNumber -lt 23451)
{
return
}
@ -6755,6 +6759,7 @@ function NetworkAdaptersSavePower
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Start-Sleep -Seconds 2
}
}
@ -7157,7 +7162,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
(Get-Item -Path "$FolderPath\desktop.ini" -Force).Attributes = "Hidden", "System", "Archive"
(Get-Item -Path "$FolderPath\desktop.ini" -Force).Refresh()
if ((Get-ChildItem -Path $CurrentUserFolderPath | Measure-Object).Count -ne 0)
if ((Get-ChildItem -Path $CurrentUserFolderPath -ErrorAction Ignore | Measure-Object).Count -ne 0)
{
Write-Error -Message ($Localization.UserShellFolderNotEmpty -f $CurrentUserFolderPath) -ErrorAction SilentlyContinue
}
@ -7572,7 +7577,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
if ($FolderBrowserDialog.SelectedPath)
{
Set-UserShellFolder -UserFolder Videos -FolderPath $FolderBrowserDialog.SelectedPath ###
Set-UserShellFolder -UserFolder Videos -FolderPath $FolderBrowserDialog.SelectedPath
}
}
$Skip
@ -11502,6 +11507,7 @@ function HEVC
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Verbose -Message $Localization.HEVCDownloading -Verbose
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
@ -14764,6 +14770,7 @@ function UpdateLGPEPolicies
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Verbose -Message HKLM -Verbose
Write-Information -MessageData "" -InformationAction Continue
@ -15122,6 +15129,7 @@ public static void PostMessage()
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
}
#endregion Post Actions

4
src/Sophia_Script_for_Windows_11/Sophia.ps1

@ -243,8 +243,8 @@ BingSearch -Disable
# Включить поиск через Bing в меню "Пуск" (значение по умолчанию)
# BingSearch -Enable
# Do not show websites from your browsing history in the Start menu
# Не показать веб-сайты из журнала браузера в меню "Пуск"
# Do not show websites from your browsing history in the Start menu. Windows 11 build 23451 (Dev) required
# Не показать веб-сайты из журнала браузера в меню "Пуск". Требуется Windows 11 build 23451 (Dev)
BrowsingHistory -Hide
# Show websites from your browsing history in the Start menu (default value)

21
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -836,6 +836,7 @@ public static string GetString(uint strId)
# Split the Array variable content
$IPArray = $IPArray -split "`r?`n" | Where-Object -FilterScript {$_ -notmatch "#"}
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
@ -2385,6 +2386,9 @@ function BingSearch
.EXAMPLE
BrowsingHistory -Show
.NOTES
Windows 11 build 23451 (Dev) required
.NOTES
Current user
#>
@ -6757,6 +6761,7 @@ function NetworkAdaptersSavePower
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Start-Sleep -Seconds 2
}
}
@ -7159,7 +7164,7 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
(Get-Item -Path "$FolderPath\desktop.ini" -Force).Attributes = "Hidden", "System", "Archive"
(Get-Item -Path "$FolderPath\desktop.ini" -Force).Refresh()
if ((Get-ChildItem -Path $CurrentUserFolderPath | Measure-Object).Count -ne 0)
if ((Get-ChildItem -Path $CurrentUserFolderPath -ErrorAction Ignore | Measure-Object).Count -ne 0)
{
Write-Error -Message ($Localization.UserShellFolderNotEmpty -f $CurrentUserFolderPath) -ErrorAction SilentlyContinue
}
@ -9754,7 +9759,7 @@ function InstallVCRedist
if ([System.Version](Get-AppxPackage -Name Microsoft.DesktopAppInstaller -ErrorAction Ignore).Version -ge [System.Version]"1.17")
{
# https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Microsoft/VCRedist/2015%2B
winget install --id=Microsoft.VCRedist.2015+.x86 --exact --accept-source-agreements
winget install --id=Microsoft.VCRedist.2015+.x86 --exact --force --accept-source-agreements
winget install --id=Microsoft.VCRedist.2015+.x64 --exact --force --accept-source-agreements
# PowerShell 5.1 (7.3 too) interprets 8.3 file name literally, if an environment variable contains a non-latin word
@ -11524,6 +11529,7 @@ function HEVC
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Verbose -Message $Localization.HEVCDownloading -Verbose
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
@ -11814,13 +11820,16 @@ function Set-AppGraphicsPerformance
{
if (Get-CimInstance -ClassName Win32_VideoController | Where-Object -FilterScript {($_.AdapterDACType -ne "Internal") -and ($null -ne $_.AdapterDACType)})
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.GraphicsPerformanceTitle -Verbose
do
{
$Choice = Show-Menu -Title $Localization.GraphicsPerformanceTitle -Menu @($Yes, $No) -Default 2
$Choice = Show-Menu -Menu @($Browse, $Skip) -Default 2
switch ($Choice)
{
$Yes
$Browse
{
Add-Type -AssemblyName System.Windows.Forms
$OpenFileDialog = New-Object -TypeName System.Windows.Forms.OpenFileDialog
@ -11841,7 +11850,7 @@ function Set-AppGraphicsPerformance
New-ItemProperty -Path HKCU:\Software\Microsoft\DirectX\UserGpuPreferences -Name $OpenFileDialog.FileName -PropertyType String -Value "GpuPreference=2;" -Force
}
}
$No
$Skip
{
Write-Information -MessageData "" -InformationAction Continue
Write-Verbose -Message $Localization.Skipped -Verbose
@ -14782,6 +14791,7 @@ function UpdateLGPEPolicies
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Verbose -Message $Localization.GPOUpdate -Verbose
Write-Verbose -Message HKLM -Verbose
Write-Information -MessageData "" -InformationAction Continue
@ -15140,6 +15150,7 @@ public static void PostMessage()
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod
}
#endregion Post Actions

4
src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

@ -252,8 +252,8 @@ BingSearch -Disable
# Включить поиск через Bing в меню "Пуск" (значение по умолчанию)
# BingSearch -Enable
# Do not show websites from your browsing history in the Start menu
# Не показать веб-сайты из журнала браузера в меню "Пуск"
# Do not show websites from your browsing history in the Start menu. Windows 11 build 23451 (Dev) required
# Не показать веб-сайты из журнала браузера в меню "Пуск". Требуется Windows 11 build 23451 (Dev)
BrowsingHistory -Hide
# Show websites from your browsing history in the Start menu (default value)

Loading…
Cancel
Save