@@ -2,8 +2,8 @@
.SYNOPSIS
"Windows 10 Sophia Script" (LTSC version) is a PowerShell module for Windows 10 fine-tuning and automating the routine tasks
Version: v5.2.6
Date: 01.06.2021
Version: v5.2.7
Date: 13.06.2021
Copyright (c) 2014–2021 farag
Copyright (c) 2019–2021 farag & Inestic
@@ -137,7 +137,7 @@ function Checkings
{
"0"
{
Invoke-Item -Path $PSScriptRoot\Sophia.ps1
Invoke-Item -Path $PSScriptRoot\..\Sophia.ps1
exit
}
"1"
@@ -2632,11 +2632,11 @@ function StorageSense
.SYNOPSIS
Configure Storage Sense running
.PARAMETER Disable
Run Storage Sense every month/during low free disk space
.PARAMETER Month
Run Storage Sense every month
.PARAMETER Enable
Run Storage Sense every month/during low free disk space
.PARAMETER Default
Run Storage Sense during low free disk space
.EXAMPLE
StorageSenseFrequency -Month
@@ -4583,73 +4583,73 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
Add-Type @Signature
}

foreach ($guid in $KnownFolders[$KnownFolder])
foreach ($GUID in $KnownFolders[$KnownFolder])
{
[WinAPI.KnownFolders]::SHSetKnownFolderPath([ref]$guid, 0, 0, $Path)
[WinAPI.KnownFolders]::SHSetKnownFolderPath([ref]$GUID, 0, 0, $Path)
}
(Get-Item -Path $Path -Force).Attributes = "ReadOnly"
}

$UserShellFoldersRegName = @{
"Desktop" = "Desktop"
"Documents" = "Personal"
"Downloads" = "{374DE290-123F-4565-9164-39C4925E467B}"
"Music" = "My Music"
"Pictures" = "My Pictures"
"Videos" = "My Video"
$UserShellFoldersRegistryNames = @{
"Desktop" = "Desktop"
"Documents" = "Personal"
"Downloads" = "{374DE290-123F-4565-9164-39C4925E467B}"
"Music" = "My Music"
"Pictures" = "My Pictures"
"Videos" = "My Video"
}

$UserShellFoldersGUID = @{
"Desktop" = "{754AC886-DF64-4CBA-86B5-F7FBF4FBCEF5}"
"Documents" = "{F42EE2D3-909F-4907-8871-4C22FC0BF756}"
"Downloads" = "{7D83EE9B-2244-4E70-B1F5-5393042AF1E4}"
"Music" = "{A0C69A99-21C8-4671-8703-7934162FCF1D}"
"Pictures" = "{0DDD015D-B06C-45D5-8C4C-F59713854639}"
"Videos" = "{35286A68-3C57-41A1-BBB1-0EAE73D76C95}"
$UserShellFoldersGUIDs = @{
"Desktop" = "{754AC886-DF64-4CBA-86B5-F7FBF4FBCEF5}"
"Documents" = "{F42EE2D3-909F-4907-8871-4C22FC0BF756}"
"Downloads" = "{7D83EE9B-2244-4E70-B1F5-5393042AF1E4}"
"Music" = "{A0C69A99-21C8-4671-8703-7934162FCF1D}"
"Pictures" = "{0DDD015D-B06C-45D5-8C4C-F59713854639}"
"Videos" = "{35286A68-3C57-41A1-BBB1-0EAE73D76C95}"
}

# Contents of the hidden desktop.ini file for each type of user folders
$DesktopINI = @{
"Desktop" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21769",
"IconResource=%SystemRoot%\system32\imageres.dll,-183"
"Documents" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770",
"IconResource=%SystemRoot%\system32\imageres.dll,-112",
"IconFile=%SystemRoot%\system32\shell32.dll",
"IconIndex=-235"
"Downloads" = "",
"[.ShellClassInfo]","LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21798",
"IconResource=%SystemRoot%\system32\imageres.dll,-184"
"Music" = "",
"[.ShellClassInfo]","LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21790",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12689",
"IconResource=%SystemRoot%\system32\imageres.dll,-108",
"IconFile=%SystemRoot%\system32\shell32.dll","IconIndex=-237"
"Pictures" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21779",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12688",
"IconResource=%SystemRoot%\system32\imageres.dll,-113",
"IconFile=%SystemRoot%\system32\shell32.dll",
"IconIndex=-236"
"Videos" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21791",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12690",
"IconResource=%SystemRoot%\system32\imageres.dll,-189",
"IconFile=%SystemRoot%\system32\shell32.dll","IconIndex=-238"
"Desktop" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21769",
"IconResource=%SystemRoot%\system32\imageres.dll,-183"
"Documents" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770",
"IconResource=%SystemRoot%\system32\imageres.dll,-112",
"IconFile=%SystemRoot%\system32\shell32.dll",
"IconIndex=-235"
"Downloads" = "",
"[.ShellClassInfo]","LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21798",
"IconResource=%SystemRoot%\system32\imageres.dll,-184"
"Music" = "",
"[.ShellClassInfo]","LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21790",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12689",
"IconResource=%SystemRoot%\system32\imageres.dll,-108",
"IconFile=%SystemRoot%\system32\shell32.dll","IconIndex=-237"
"Pictures" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21779",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12688",
"IconResource=%SystemRoot%\system32\imageres.dll,-113",
"IconFile=%SystemRoot%\system32\shell32.dll",
"IconIndex=-236"
"Videos" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21791",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12690",
"IconResource=%SystemRoot%\system32\imageres.dll,-189",
"IconFile=%SystemRoot%\system32\shell32.dll","IconIndex=-238"
}

# Determining the current user folder path
$UserShellFolderRegValue = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name $UserShellFoldersRegName[$UserFolder]
if ($UserShellFolderRegValue -ne $FolderPath)
$UserShellFolderRegistryValue = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name $UserShellFoldersRegistryNames[$UserFolder]
if ($UserShellFolderRegistryValue -ne $FolderPath)
{
if ((Get-ChildItem -Path $UserShellFolderRegValue | Measure-Object).Count -ne 0)
if ((Get-ChildItem -Path $UserShellFolderRegistryValue | Measure-Object).Count -ne 0)
{
Write-Error -Message ($Localization.UserShellFolderNotEmpty -f $UserShellFolderRegValue) -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.UserShellFolderNotEmpty -f $UserShellFolderRegistryValue) -ErrorAction SilentlyContinue
}

# Creating a new folder if there is no one
@@ -4661,11 +4661,11 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
# Removing old desktop.ini
if ($RemoveDesktopINI.IsPresent)
{
Remove-Item -Path "$UserShellFolderRegValue\desktop.ini" -Force
Remove-Item -Path "$UserShellFolderRegistryValue\desktop.ini" -Force
}

KnownFolderPath -KnownFolder $UserFolder -Path $FolderPath
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name $UserShellFoldersGUID[$UserFolder] -PropertyType ExpandString -Value $FolderPath -Force
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name $UserShellFoldersGUIDs[$UserFolder] -PropertyType ExpandString -Value $FolderPath -Force

# Save desktop.ini in the UTF-16 LE encoding
Set-Content -Path "$FolderPath\desktop.ini" -Value $DesktopINI[$UserFolder] -Encoding Unicode -Force
@@ -4958,9 +4958,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $DesktopLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -4994,9 +4994,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $DocumentsLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -5030,9 +5030,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $DownloadsLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -5066,9 +5066,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $MusicLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -5102,9 +5102,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $PicturesLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -5138,9 +5138,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $VideosLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -2,8 +2,8 @@
.SYNOPSIS
Default preset file for "Windows 10 Sophia Script" (LTSC version)
Version: v5.2.6
Date: 01.06.2021
Version: v5.2.7
Date: 13.06.2021
Copyright (c) 2014–2021 farag
Copyright (c) 2019–2021 farag & Inestic
@@ -71,10 +71,10 @@ param

Clear-Host

$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script for LTSC v5.2.6 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021"
$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script for LTSC v5.2.7 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021"

Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Sophia.psd1 -PassThru -Force
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

Import-LocalizedData -BindingVariable Global:Localization -FileName Sophia -BaseDirectory $PSScriptRoot\Localizations

@@ -107,10 +107,10 @@ if ($Functions)

#region Protection
<#
Checkings. If you want to disable a warning message about whether you've customized the preset file remove the "-Warning" argument
The necessary checkings. If you want to disable a warning message about whether you've customized the preset file remove the "-Warning" argument
Please, do not comment out this function
Проверки. Чтобы выключить предупреждение о необходимости настройки пресет-файла, удалите аргумент "-Warning"
Обязательные проверки. Чтобы выключить предупреждение о необходимости настройки пресет-файла, удалите аргумент "-Warning"
Пожалуйста, не комментируйте данную функцию
#>
Checkings -Warning
@@ -999,8 +999,15 @@ MSIExtractContext -Add
# Удалить пункт "Извлечь все" из контекстного меню Windows Installer (.msi) (значение по умолчанию)
# MSIExtractContext -Remove

# Add the "Install" item to the .cab archives context menu
# Добавить пункт "Установить" в контекстное меню .cab архивов
<#
Add the "Install" item to the .cab archives context menu
If the .cab file extension type associated to open with a third party app by default, the "Install" context menu item won't be displayed,
so the default association for the .cab file type will be restored forcedly
Добавить пункт "Установить" в контекстное меню .cab архивов
Если .cab файлы ассоциированы со сторонним приложением, пункт "Установить" в контекстное меню не будет отображаться,
поэтому принудительно будет восстановлена ассоциация по умолчанию
#>
CABInstallContext -Add

# Remove the "Install" item from the .cab archives context menu (default value)
@@ -2,8 +2,8 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v5.10.6
Date: 01.06.2021
Version: v5.10.7
Date: 13.06.2021
Copyright (c) 2014–2021 farag
Copyright (c) 2019–2021 farag & oZ-Zo
@@ -66,10 +66,10 @@ function Sophia

Clear-Host

$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script v5.10.6 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021"
$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script v5.10.7 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021"

Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Sophia.psd1 -PassThru -Force
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

Import-LocalizedData -BindingVariable Global:Localization -FileName Sophia -BaseDirectory $PSScriptRoot\Localizations

@@ -54,6 +54,7 @@ ErrorsFile = 文件
ErrorsMessage = 错误/警告
Add = 添加
AllFilesFilter = 所有文件 (*.*)|*.*
Browse = 浏览
Change = 更改
DialogBoxOpening = 显示对话窗口……
Disable = 禁用
@@ -74,7 +75,6 @@ Open = 打开
Patient = 请等待……
Restore = 恢复
Run = 运行
Select = 选择
SelectAll = 全选
Skip = 跳过
Skipped = 已跳过
@@ -54,6 +54,7 @@ ErrorsFile = Datei
ErrorsMessage = Fehler/Warnungen
Add = Hinzufügen
AllFilesFilter = Alle Dateien (*.*)|*.*
Browse = Durchsuche
Change = Ändern
DialogBoxOpening = Anzeigen des Dialogfensters...
Disable = Deaktivieren
@@ -74,7 +75,6 @@ Open = Öffnen
Patient = Bitte Warten...
Restore = Wiederherstellen
Run = Starten
Select = Wählen Sie
SelectAll = Wählen Sie Alle
Skip = Überspringen
Skipped = Übersprungen
@@ -54,6 +54,7 @@ ErrorsFile = File
ErrorsMessage = Errors/Warnings
Add = Add
AllFilesFilter = All Files (*.*)|*.*
Browse = Browse
Change = Change
DialogBoxOpening = Displaying the dialog box...
Disable = Disable
@@ -74,7 +75,6 @@ Open = Open
Patient = Please wait...
Restore = Restore
Run = Run
Select = Select
SelectAll = Select all
Skip = Skip
Skipped = Skipped
@@ -54,6 +54,7 @@ ErrorsFile = Archivo
ErrorsMessage = Errores/Advertencias
Add = Agregar
AllFilesFilter = Todos los archivos (*.*)|*.*
Browse = Examinar
Change = Cambio
DialogBoxOpening = Viendo el cuadro de diálogo...
Disable = Desactivar
@@ -74,7 +75,6 @@ Open = Abierta
Patient = Por favor espere...
Restore = Restaurar
Run = Iniciar
Select = Seleccionar
SelectAll = Seleccionar todo
Skip = Omitir
Skipped = Omitido
@@ -54,6 +54,7 @@ ErrorsFile = Fichier
ErrorsMessage = Erreurs/Avertissements
Add = Ajouter
AllFilesFilter = Tous les Fichiers (*.*)|*.*
Browse = Parcourir
Change = Changer
DialogBoxOpening = Afficher la boîte de dialogue...
Disable = Désactiver
@@ -74,7 +75,6 @@ Open = Ouvert
Patient = Veuillez patienter...
Restore = Restaurer
Run = Démarrer
Select = Sélectionner
SelectAll = Tout sélectionner
Skip = Passer
Skipped = Passé
@@ -54,6 +54,7 @@ ErrorsFile = Fájl
ErrorsMessage = Hibák/Figyelmeztetések
Add = Hozzáadás
AllFilesFilter = Összes fájl (*.*)|*.*
Browse = Pregledavati
Change = Szerkesztés
DialogBoxOpening = Párbeszédablak megjelenítése...
Disable = Kikapcsolás
@@ -74,7 +75,6 @@ Open = Megnyitás
Patient = Kérem várjon...
Restore = Visszaállítás
Run = Futtatás
Select = Kijelölés
SelectAll = Összes kijelölése
Skip = Átugrás
Skipped = Átugorva
@@ -54,6 +54,7 @@ ErrorsFile = File
ErrorsMessage = Errori/avvisi
Add = Inserisci
AllFilesFilter = Tutti i file (*.*)|*.*
Browse = Sfogliare
Change = Modificare
DialogBoxOpening = Visualizzazione della finestra di dialogo...
Disable = Disattivare
@@ -74,7 +75,6 @@ Open = Aperto
Patient = Attendere prego...
Restore = Ristabilire
Run = Eseguire
Select = Selezionare
SelectAll = Seleziona tutto
Skip = Salta
Skipped = Saltato
@@ -54,6 +54,7 @@ ErrorsFile = Arquivo
ErrorsMessage = Erros/Avisos
Add = Adicionar
AllFilesFilter = Todos os arquivos (*.*)|*.*
Browse = Procurar
Change = Mudar
DialogBoxOpening = Exibindo a caixa de diálogo...
Disable = Desativar
@@ -74,7 +75,6 @@ Open = Abrir
Patient = Por favor, espere...
Restore = Restaurar
Run = Executar
Select = Selecione
SelectAll = Selecionar tudo
Skip = Pular
Skipped = Ignorados
@@ -54,6 +54,7 @@ ErrorsFile = Файл
ErrorsMessage = Ошибки/предупреждения
Add = Добавить
AllFilesFilter = Все файлы (*.*)|*.*
Browse = Обзор
Change = Изменить
DialogBoxOpening = Диалоговое окно открывается...
Disable = Отключить
@@ -74,7 +75,6 @@ Open = Открыть
Patient = Пожалуйста, подождите...
Restore = Восстановить
Run = Запустить
Select = Выбрать
SelectAll = Выбрать всё
Skip = Пропустить
Skipped = Пропущено
@@ -54,6 +54,7 @@ ErrorsFile = Dosya
ErrorsMessage = Hatalar/Uyarılar
Add = Ekle
AllFilesFilter = Tüm Dosyalar (*.*)|*.*
Browse = Gözat
Change = Değiştir
DialogBoxOpening = İletişim kutusu görüntüleniyor...
Disable = Devre dışı bırak
@@ -74,7 +75,6 @@ Open = Açık
Patient = Lütfen bekleyin...
Restore = Onar
Run = Başlat
Select = Seç
SelectAll = Hepsini seç
Skip = Atla
Skipped = Atlandı
@@ -54,6 +54,7 @@ ErrorsFile = Файл
ErrorsMessage = Помилки/попередження
Add = Додати
AllFilesFilter = Усі файли (*.*)|*.*
Browse = Переглядати
Change = Змінити
DialogBoxOpening = Діалогове вікно відкривається...
Disable = Вимкнути
@@ -74,7 +75,6 @@ Open = Відкрити
Patient = Будь ласка, зачекайте...
Restore = Відновити
Run = Запустити
Select = Вибрати
SelectAll = Вибрати все
Skip = Пропустити
Skipped = Пропущено
@@ -1,6 +1,6 @@
@{
RootModule = 'Sophia.psm1'
ModuleVersion = '5.10.6'
RootModule = '..\Module\Sophia.psm1'
ModuleVersion = '5.10.7'
GUID = '109cc881-c42b-45af-a74a-550781989d6a'
Author = 'Dmitry "farag" Nefedov'
Copyright = '(c) 2014–2021 farag & Inestic. All rights reserved'
@@ -2,8 +2,8 @@
.SYNOPSIS
"Windows 10 Sophia Script" is a PowerShell module for Windows 10 fine-tuning and automating the routine tasks
Version: v5.10.6
Date: 01.06.2021
Version: v5.10.7
Date: 13.06.2021
Copyright (c) 2014–2021 farag
Copyright (c) 2019–2021 farag & Inestic
@@ -80,7 +80,7 @@ function Checkings
# Check whether the script has been run via PowerShell ISE
if ($Host.Name -match "ISE")
{
Write-Warning -Message $Localization.UnsupportedISE ###
Write-Warning -Message $Localization.UnsupportedISE
exit
}

@@ -126,7 +126,7 @@ function Checkings
{
"0"
{
Invoke-Item -Path $PSScriptRoot\Sophia.ps1
Invoke-Item -Path $PSScriptRoot\..\Sophia.ps1
exit
}
"1"
@@ -3604,11 +3604,11 @@ function StorageSense
.SYNOPSIS
Configure Storage Sense running
.PARAMETER Disable
Run Storage Sense every month/during low free disk space
.PARAMETER Month
Run Storage Sense every month
.PARAMETER Enable
Run Storage Sense every month/during low free disk space
.PARAMETER Default
Run Storage Sense during low free disk space
.EXAMPLE
StorageSenseFrequency -Month
@@ -5574,73 +5574,73 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
Add-Type @Signature
}

foreach ($guid in $KnownFolders[$KnownFolder])
foreach ($GUID in $KnownFolders[$KnownFolder])
{
[WinAPI.KnownFolders]::SHSetKnownFolderPath([ref]$guid, 0, 0, $Path)
[WinAPI.KnownFolders]::SHSetKnownFolderPath([ref]$GUID, 0, 0, $Path)
}
(Get-Item -Path $Path -Force).Attributes = "ReadOnly"
}

$UserShellFoldersRegName = @{
"Desktop" = "Desktop"
"Documents" = "Personal"
"Downloads" = "{374DE290-123F-4565-9164-39C4925E467B}"
"Music" = "My Music"
"Pictures" = "My Pictures"
"Videos" = "My Video"
$UserShellFoldersRegistryNames = @{
"Desktop" = "Desktop"
"Documents" = "Personal"
"Downloads" = "{374DE290-123F-4565-9164-39C4925E467B}"
"Music" = "My Music"
"Pictures" = "My Pictures"
"Videos" = "My Video"
}

$UserShellFoldersGUID = @{
"Desktop" = "{754AC886-DF64-4CBA-86B5-F7FBF4FBCEF5}"
"Documents" = "{F42EE2D3-909F-4907-8871-4C22FC0BF756}"
"Downloads" = "{7D83EE9B-2244-4E70-B1F5-5393042AF1E4}"
"Music" = "{A0C69A99-21C8-4671-8703-7934162FCF1D}"
"Pictures" = "{0DDD015D-B06C-45D5-8C4C-F59713854639}"
"Videos" = "{35286A68-3C57-41A1-BBB1-0EAE73D76C95}"
$UserShellFoldersGUIDs = @{
"Desktop" = "{754AC886-DF64-4CBA-86B5-F7FBF4FBCEF5}"
"Documents" = "{F42EE2D3-909F-4907-8871-4C22FC0BF756}"
"Downloads" = "{7D83EE9B-2244-4E70-B1F5-5393042AF1E4}"
"Music" = "{A0C69A99-21C8-4671-8703-7934162FCF1D}"
"Pictures" = "{0DDD015D-B06C-45D5-8C4C-F59713854639}"
"Videos" = "{35286A68-3C57-41A1-BBB1-0EAE73D76C95}"
}

# Contents of the hidden desktop.ini file for each type of user folders
$DesktopINI = @{
"Desktop" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21769",
"IconResource=%SystemRoot%\system32\imageres.dll,-183"
"Documents" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770",
"IconResource=%SystemRoot%\system32\imageres.dll,-112",
"IconFile=%SystemRoot%\system32\shell32.dll",
"IconIndex=-235"
"Downloads" = "",
"[.ShellClassInfo]","LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21798",
"IconResource=%SystemRoot%\system32\imageres.dll,-184"
"Music" = "",
"[.ShellClassInfo]","LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21790",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12689",
"IconResource=%SystemRoot%\system32\imageres.dll,-108",
"IconFile=%SystemRoot%\system32\shell32.dll","IconIndex=-237"
"Pictures" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21779",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12688",
"IconResource=%SystemRoot%\system32\imageres.dll,-113",
"IconFile=%SystemRoot%\system32\shell32.dll",
"IconIndex=-236"
"Videos" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21791",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12690",
"IconResource=%SystemRoot%\system32\imageres.dll,-189",
"IconFile=%SystemRoot%\system32\shell32.dll","IconIndex=-238"
"Desktop" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21769",
"IconResource=%SystemRoot%\system32\imageres.dll,-183"
"Documents" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770",
"IconResource=%SystemRoot%\system32\imageres.dll,-112",
"IconFile=%SystemRoot%\system32\shell32.dll",
"IconIndex=-235"
"Downloads" = "",
"[.ShellClassInfo]","LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21798",
"IconResource=%SystemRoot%\system32\imageres.dll,-184"
"Music" = "",
"[.ShellClassInfo]","LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21790",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12689",
"IconResource=%SystemRoot%\system32\imageres.dll,-108",
"IconFile=%SystemRoot%\system32\shell32.dll","IconIndex=-237"
"Pictures" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21779",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12688",
"IconResource=%SystemRoot%\system32\imageres.dll,-113",
"IconFile=%SystemRoot%\system32\shell32.dll",
"IconIndex=-236"
"Videos" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21791",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12690",
"IconResource=%SystemRoot%\system32\imageres.dll,-189",
"IconFile=%SystemRoot%\system32\shell32.dll","IconIndex=-238"
}

# Determining the current user folder path
$UserShellFolderRegValue = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name $UserShellFoldersRegName[$UserFolder]
if ($UserShellFolderRegValue -ne $FolderPath)
$UserShellFolderRegistryValue = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name $UserShellFoldersRegistryNames[$UserFolder]
if ($UserShellFolderRegistryValue -ne $FolderPath)
{
if ((Get-ChildItem -Path $UserShellFolderRegValue | Measure-Object).Count -ne 0)
if ((Get-ChildItem -Path $UserShellFolderRegistryValue | Measure-Object).Count -ne 0)
{
Write-Error -Message ($Localization.UserShellFolderNotEmpty -f $UserShellFolderRegValue) -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.UserShellFolderNotEmpty -f $UserShellFolderRegistryValue) -ErrorAction SilentlyContinue
}

# Creating a new folder if there is no one
@@ -5652,11 +5652,11 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
# Removing old desktop.ini
if ($RemoveDesktopINI.IsPresent)
{
Remove-Item -Path "$UserShellFolderRegValue\desktop.ini" -Force
Remove-Item -Path "$UserShellFolderRegistryValue\desktop.ini" -Force
}

KnownFolderPath -KnownFolder $UserFolder -Path $FolderPath
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name $UserShellFoldersGUID[$UserFolder] -PropertyType ExpandString -Value $FolderPath -Force
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name $UserShellFoldersGUIDs[$UserFolder] -PropertyType ExpandString -Value $FolderPath -Force

# Save desktop.ini in the UTF-16 LE encoding
Set-Content -Path "$FolderPath\desktop.ini" -Value $DesktopINI[$UserFolder] -Encoding Unicode -Force
@@ -5949,9 +5949,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $DesktopLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -5985,9 +5985,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $DocumentsLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -6021,9 +6021,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $DownloadsLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -6057,9 +6057,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $MusicLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -6093,9 +6093,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $PicturesLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -6129,9 +6129,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $VideosLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -2,8 +2,8 @@
.SYNOPSIS
Default preset file for "Windows 10 Sophia Script"
Version: v5.10.6
Date: 01.06.2021
Version: v5.10.7
Date: 13.06.2021
Copyright (c) 2014–2021 farag
Copyright (c) 2019–2021 farag & Inestic
@@ -71,10 +71,10 @@ param

Clear-Host

$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script v5.10.6 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021"
$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script v5.10.7 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021"

Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Sophia.psd1 -PassThru -Force
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

Import-LocalizedData -BindingVariable Global:Localization -FileName Sophia -BaseDirectory $PSScriptRoot\Localizations

@@ -107,10 +107,10 @@ if ($Functions)

#region Protection
<#
Checkings. If you want to disable a warning message about whether you've customized the preset file remove the "-Warning" argument
The necessary checkings. If you want to disable a warning message about whether you've customized the preset file remove the "-Warning" argument
Please, do not comment out this function
Проверки. Чтобы выключить предупреждение о необходимости настройки пресет-файла, удалите аргумент "-Warning"
Обязательные проверки. Чтобы выключить предупреждение о необходимости настройки пресет-файла, удалите аргумент "-Warning"
Пожалуйста, не комментируйте данную функцию
#>
Checkings -Warning
@@ -433,11 +433,11 @@ TrayIcons -Show
# TrayIcons -Hide

# Hide the Meet Now icon in the notification area
# Скрыть иконку "Провести собрание" в трее
# Скрыть иконку "Провести собрание" в области уведомлений
MeetNow -Hide

# Show the Meet Now icon in the notification area
# Отображать иконку "Провести собрание" в трее
# Отображать иконку "Провести собрание" в области уведомлений
# MeetNow -Show

# Hide "News and Interests" on the taskbar
@@ -2,8 +2,8 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v5.10.6
Date: 01.06.2021
Version: v5.10.7
Date: 13.06.2021
Copyright (c) 2014–2021 farag
Copyright (c) 2019–2021 farag & oZ-Zo
@@ -66,10 +66,10 @@ function Sophia

Clear-Host

$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script v5.10.6 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021"
$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script v5.10.7 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021"

Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Sophia.psd1 -PassThru -Force
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

Import-LocalizedData -BindingVariable Global:Localization -FileName Sophia -BaseDirectory $PSScriptRoot\Localizations

@@ -54,6 +54,7 @@ ErrorsFile = 文件
ErrorsMessage = 错误/警告
Add = 添加
AllFilesFilter = 所有文件 (*.*)|*.*
Browse = 浏览
Change = 更改
DialogBoxOpening = 显示对话窗口……
Disable = 禁用
@@ -74,7 +75,6 @@ Open = 打开
Patient = 请等待……
Restore = 恢复
Run = 运行
Select = 选择
SelectAll = 全选
Skip = 跳过
Skipped = 已跳过
@@ -54,6 +54,7 @@ ErrorsFile = Datei
ErrorsMessage = Fehler/Warnungen
Add = Hinzufügen
AllFilesFilter = Alle Dateien (*.*)|*.*
Browse = Durchsuche
Change = Ändern
DialogBoxOpening = Anzeigen des Dialogfensters...
Disable = Deaktivieren
@@ -74,7 +75,6 @@ Open = Öffnen
Patient = Bitte Warten...
Restore = Wiederherstellen
Run = Starten
Select = Wählen Sie
SelectAll = Wählen Sie Alle
Skip = Überspringen
Skipped = Übersprungen
@@ -54,6 +54,7 @@ ErrorsFile = File
ErrorsMessage = Errors/Warnings
Add = Add
AllFilesFilter = All Files (*.*)|*.*
Browse = Browse
Change = Change
DialogBoxOpening = Displaying the dialog box...
Disable = Disable
@@ -74,7 +75,6 @@ Open = Open
Patient = Please wait...
Restore = Restore
Run = Run
Select = Select
SelectAll = Select all
Skip = Skip
Skipped = Skipped
@@ -54,6 +54,7 @@ ErrorsFile = Archivo
ErrorsMessage = Errores/Advertencias
Add = Agregar
AllFilesFilter = Todos los archivos (*.*)|*.*
Browse = Examinar
Change = Cambio
DialogBoxOpening = Viendo el cuadro de diálogo...
Disable = Desactivar
@@ -74,7 +75,6 @@ Open = Abierta
Patient = Por favor espere...
Restore = Restaurar
Run = Iniciar
Select = Seleccionar
SelectAll = Seleccionar todo
Skip = Omitir
Skipped = Omitido
@@ -54,6 +54,7 @@ ErrorsFile = Fichier
ErrorsMessage = Erreurs/Avertissements
Add = Ajouter
AllFilesFilter = Tous les Fichiers (*.*)|*.*
Browse = Parcourir
Change = Changer
DialogBoxOpening = Afficher la boîte de dialogue...
Disable = Désactiver
@@ -74,7 +75,6 @@ Open = Ouvert
Patient = Veuillez patienter...
Restore = Restaurer
Run = Démarrer
Select = Sélectionner
SelectAll = Tout sélectionner
Skip = Passer
Skipped = Passé
@@ -54,6 +54,7 @@ ErrorsFile = Fájl
ErrorsMessage = Hibák/Figyelmeztetések
Add = Hozzáadás
AllFilesFilter = Összes fájl (*.*)|*.*
Browse = Pregledavati
Change = Szerkesztés
DialogBoxOpening = Párbeszédablak megjelenítése...
Disable = Kikapcsolás
@@ -74,7 +75,6 @@ Open = Megnyitás
Patient = Kérem várjon...
Restore = Visszaállítás
Run = Futtatás
Select = Kijelölés
SelectAll = Összes kijelölése
Skip = Átugrás
Skipped = Átugorva
@@ -54,6 +54,7 @@ ErrorsFile = File
ErrorsMessage = Errori/avvisi
Add = Inserisci
AllFilesFilter = Tutti i file (*.*)|*.*
Browse = Sfogliare
Change = Modificare
DialogBoxOpening = Visualizzazione della finestra di dialogo...
Disable = Disattivare
@@ -74,7 +75,6 @@ Open = Aperto
Patient = Attendere prego...
Restore = Ristabilire
Run = Eseguire
Select = Selezionare
SelectAll = Seleziona tutto
Skip = Salta
Skipped = Saltato
@@ -54,6 +54,7 @@ ErrorsFile = Arquivo
ErrorsMessage = Erros/Avisos
Add = Adicionar
AllFilesFilter = Todos os arquivos (*.*)|*.*
Browse = Procurar
Change = Mudar
DialogBoxOpening = Exibindo a caixa de diálogo...
Disable = Desativar
@@ -74,7 +75,6 @@ Open = Abrir
Patient = Por favor, espere...
Restore = Restaurar
Run = Executar
Select = Selecione
SelectAll = Selecionar tudo
Skip = Pular
Skipped = Ignorados
@@ -54,6 +54,7 @@ ErrorsFile = Файл
ErrorsMessage = Ошибки/предупреждения
Add = Добавить
AllFilesFilter = Все файлы (*.*)|*.*
Browse = Обзор
Change = Изменить
DialogBoxOpening = Диалоговое окно открывается...
Disable = Отключить
@@ -74,7 +75,6 @@ Open = Открыть
Patient = Пожалуйста, подождите...
Restore = Восстановить
Run = Запустить
Select = Выбрать
SelectAll = Выбрать всё
Skip = Пропустить
Skipped = Пропущено
@@ -54,6 +54,7 @@ ErrorsFile = Dosya
ErrorsMessage = Hatalar/Uyarılar
Add = Ekle
AllFilesFilter = Tüm Dosyalar (*.*)|*.*
Browse = Gözat
Change = Değiştir
DialogBoxOpening = İletişim kutusu görüntüleniyor...
Disable = Devre dışı bırak
@@ -74,7 +75,6 @@ Open = Açık
Patient = Lütfen bekleyin...
Restore = Onar
Run = Başlat
Select = Seç
SelectAll = Hepsini seç
Skip = Atla
Skipped = Atlandı
@@ -54,6 +54,7 @@ ErrorsFile = Файл
ErrorsMessage = Помилки/попередження
Add = Додати
AllFilesFilter = Усі файли (*.*)|*.*
Browse = Переглядати
Change = Змінити
DialogBoxOpening = Діалогове вікно відкривається...
Disable = Вимкнути
@@ -74,7 +75,6 @@ Open = Відкрити
Patient = Будь ласка, зачекайте...
Restore = Відновити
Run = Запустити
Select = Вибрати
SelectAll = Вибрати все
Skip = Пропустити
Skipped = Пропущено
@@ -1,6 +1,6 @@
@{
RootModule = 'Sophia.psm1'
ModuleVersion = '5.10.6'
RootModule = '..\Module\Sophia.psm1'
ModuleVersion = '5.10.7'
GUID = 'aa0b47a7-1770-4b5d-8c9f-cc6c505bcc7a'
Author = 'Dmitry "farag" Nefedov'
Copyright = '(c) 2014–2021 farag & Inestic. All rights reserved'
@@ -2,8 +2,8 @@
.SYNOPSIS
"Windows 10 Sophia Script" is a PowerShell module for Windows 10 fine-tuning and automating the routine tasks
Version: v5.10.6
Date: 01.06.2021
Version: v5.10.7
Date: 13.06.2021
Copyright (c) 2014–2021 farag
Copyright (c) 2019–2021 farag & Inestic
@@ -126,7 +126,7 @@ function Checkings
{
"0"
{
Invoke-Item -Path $PSScriptRoot\Sophia.ps1
Invoke-Item -Path $PSScriptRoot\..\Sophia.ps1
exit
}
"1"
@@ -3608,11 +3608,11 @@ function StorageSense
.SYNOPSIS
Configure Storage Sense running
.PARAMETER Disable
Run Storage Sense every month/during low free disk space
.PARAMETER Month
Run Storage Sense every month
.PARAMETER Enable
Run Storage Sense every month/during low free disk space
.PARAMETER Default
Run Storage Sense during low free disk space
.EXAMPLE
StorageSenseFrequency -Month
@@ -5588,73 +5588,73 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
Add-Type @Signature
}

foreach ($guid in $KnownFolders[$KnownFolder])
foreach ($GUID in $KnownFolders[$KnownFolder])
{
[WinAPI.KnownFolders]::SHSetKnownFolderPath([ref]$guid, 0, 0, $Path)
[WinAPI.KnownFolders]::SHSetKnownFolderPath([ref]$GUID, 0, 0, $Path)
}
(Get-Item -Path $Path -Force).Attributes = "ReadOnly"
}

$UserShellFoldersRegName = @{
"Desktop" = "Desktop"
"Documents" = "Personal"
"Downloads" = "{374DE290-123F-4565-9164-39C4925E467B}"
"Music" = "My Music"
"Pictures" = "My Pictures"
"Videos" = "My Video"
$UserShellFoldersRegistryNames = @{
"Desktop" = "Desktop"
"Documents" = "Personal"
"Downloads" = "{374DE290-123F-4565-9164-39C4925E467B}"
"Music" = "My Music"
"Pictures" = "My Pictures"
"Videos" = "My Video"
}

$UserShellFoldersGUID = @{
"Desktop" = "{754AC886-DF64-4CBA-86B5-F7FBF4FBCEF5}"
"Documents" = "{F42EE2D3-909F-4907-8871-4C22FC0BF756}"
"Downloads" = "{7D83EE9B-2244-4E70-B1F5-5393042AF1E4}"
"Music" = "{A0C69A99-21C8-4671-8703-7934162FCF1D}"
"Pictures" = "{0DDD015D-B06C-45D5-8C4C-F59713854639}"
"Videos" = "{35286A68-3C57-41A1-BBB1-0EAE73D76C95}"
$UserShellFoldersGUIDs = @{
"Desktop" = "{754AC886-DF64-4CBA-86B5-F7FBF4FBCEF5}"
"Documents" = "{F42EE2D3-909F-4907-8871-4C22FC0BF756}"
"Downloads" = "{7D83EE9B-2244-4E70-B1F5-5393042AF1E4}"
"Music" = "{A0C69A99-21C8-4671-8703-7934162FCF1D}"
"Pictures" = "{0DDD015D-B06C-45D5-8C4C-F59713854639}"
"Videos" = "{35286A68-3C57-41A1-BBB1-0EAE73D76C95}"
}

# Contents of the hidden desktop.ini file for each type of user folders
$DesktopINI = @{
"Desktop" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21769",
"IconResource=%SystemRoot%\system32\imageres.dll,-183"
"Documents" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770",
"IconResource=%SystemRoot%\system32\imageres.dll,-112",
"IconFile=%SystemRoot%\system32\shell32.dll",
"IconIndex=-235"
"Downloads" = "",
"[.ShellClassInfo]","LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21798",
"IconResource=%SystemRoot%\system32\imageres.dll,-184"
"Music" = "",
"[.ShellClassInfo]","LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21790",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12689",
"IconResource=%SystemRoot%\system32\imageres.dll,-108",
"IconFile=%SystemRoot%\system32\shell32.dll","IconIndex=-237"
"Pictures" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21779",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12688",
"IconResource=%SystemRoot%\system32\imageres.dll,-113",
"IconFile=%SystemRoot%\system32\shell32.dll",
"IconIndex=-236"
"Videos" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21791",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12690",
"IconResource=%SystemRoot%\system32\imageres.dll,-189",
"IconFile=%SystemRoot%\system32\shell32.dll","IconIndex=-238"
"Desktop" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21769",
"IconResource=%SystemRoot%\system32\imageres.dll,-183"
"Documents" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770",
"IconResource=%SystemRoot%\system32\imageres.dll,-112",
"IconFile=%SystemRoot%\system32\shell32.dll",
"IconIndex=-235"
"Downloads" = "",
"[.ShellClassInfo]","LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21798",
"IconResource=%SystemRoot%\system32\imageres.dll,-184"
"Music" = "",
"[.ShellClassInfo]","LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21790",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12689",
"IconResource=%SystemRoot%\system32\imageres.dll,-108",
"IconFile=%SystemRoot%\system32\shell32.dll","IconIndex=-237"
"Pictures" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21779",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12688",
"IconResource=%SystemRoot%\system32\imageres.dll,-113",
"IconFile=%SystemRoot%\system32\shell32.dll",
"IconIndex=-236"
"Videos" = "",
"[.ShellClassInfo]",
"LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21791",
"InfoTip=@%SystemRoot%\system32\shell32.dll,-12690",
"IconResource=%SystemRoot%\system32\imageres.dll,-189",
"IconFile=%SystemRoot%\system32\shell32.dll","IconIndex=-238"
}

# Determining the current user folder path
$UserShellFolderRegValue = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name $UserShellFoldersRegName[$UserFolder]
if ($UserShellFolderRegValue -ne $FolderPath)
$UserShellFolderRegistryValue = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name $UserShellFoldersRegistryNames[$UserFolder]
if ($UserShellFolderRegistryValue -ne $FolderPath)
{
if ((Get-ChildItem -Path $UserShellFolderRegValue | Measure-Object).Count -ne 0)
if ((Get-ChildItem -Path $UserShellFolderRegistryValue | Measure-Object).Count -ne 0)
{
Write-Error -Message ($Localization.UserShellFolderNotEmpty -f $UserShellFolderRegValue) -ErrorAction SilentlyContinue
Write-Error -Message ($Localization.UserShellFolderNotEmpty -f $UserShellFolderRegistryValue) -ErrorAction SilentlyContinue
}

# Creating a new folder if there is no one
@@ -5666,11 +5666,11 @@ public extern static int SHSetKnownFolderPath(ref Guid folderId, uint flags, Int
# Removing old desktop.ini
if ($RemoveDesktopINI.IsPresent)
{
Remove-Item -Path "$UserShellFolderRegValue\desktop.ini" -Force
Remove-Item -Path "$UserShellFolderRegistryValue\desktop.ini" -Force
}

KnownFolderPath -KnownFolder $UserFolder -Path $FolderPath
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name $UserShellFoldersGUID[$UserFolder] -PropertyType ExpandString -Value $FolderPath -Force
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name $UserShellFoldersGUIDs[$UserFolder] -PropertyType ExpandString -Value $FolderPath -Force

# Save desktop.ini in the UTF-16 LE encoding
Set-Content -Path "$FolderPath\desktop.ini" -Value $DesktopINI[$UserFolder] -Encoding Unicode -Force
@@ -5963,9 +5963,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $DesktopLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -5999,9 +5999,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $DocumentsLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -6035,9 +6035,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $DownloadsLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -6071,9 +6071,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $MusicLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -6107,9 +6107,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $PicturesLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -6143,9 +6143,9 @@ public static string GetString(uint strId)

$Title = ""
$Message = $Localization.UserFolderSelect -f $VideosLocalizedString
$Select = $Localization.Select
$Select = $Localization.Browse
$Skip = $Localization.Skip
$Options = "&$Select", "&$Skip"
$Options = "&$Browse", "&$Skip"
$DefaultChoice = 1
$Result = $Host.UI.PromptForChoice($Title, $Message, $Options, $DefaultChoice)

@@ -2,8 +2,8 @@
.SYNOPSIS
Default preset file for "Windows 10 Sophia Script"
Version: v5.10.6
Date: 01.06.2021
Version: v5.10.7
Date: 13.06.2021
Copyright (c) 2014–2021 farag
Copyright (c) 2019–2021 farag & Inestic
@@ -71,10 +71,10 @@ param

Clear-Host

$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script v5.10.6 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021"
$Host.UI.RawUI.WindowTitle = "Windows 10 Sophia Script v5.10.7 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & oz-zo, 2014–2021"

Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Sophia.psd1 -PassThru -Force
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

Import-LocalizedData -BindingVariable Global:Localization -FileName Sophia -BaseDirectory $PSScriptRoot\Localizations

@@ -107,10 +107,10 @@ if ($Functions)

#region Protection
<#
Checkings. If you want to disable a warning message about whether you've customized the preset file remove the "-Warning" argument
The necessary checkings. If you want to disable a warning message about whether you've customized the preset file remove the "-Warning" argument
Please, do not comment out this function
Проверки. Чтобы выключить предупреждение о необходимости настройки пресет-файла, удалите аргумент "-Warning"
Обязательные проверки. Чтобы выключить предупреждение о необходимости настройки пресет-файла, удалите аргумент "-Warning"
Пожалуйста, не комментируйте данную функцию
#>
Checkings -Warning
@@ -433,11 +433,11 @@ TrayIcons -Show
# TrayIcons -Hide

# Hide the Meet Now icon in the notification area
# Скрыть иконку "Провести собрание" в трее
# Скрыть иконку "Провести собрание" в области уведомлений
MeetNow -Hide

# Show the Meet Now icon in the notification area
# Отображать иконку "Провести собрание" в трее
# Отображать иконку "Провести собрание" в области уведомлений
# MeetNow -Show

# Hide "News and Interests" on the taskbar
@@ -1277,8 +1277,15 @@ MSIExtractContext -Add
# Удалить пункт "Извлечь все" из контекстного меню Windows Installer (.msi) (значение по умолчанию)
# MSIExtractContext -Remove

# Add the "Install" item to the .cab archives context menu
# Добавить пункт "Установить" в контекстное меню .cab архивов
<#
Add the "Install" item to the .cab archives context menu
If the .cab file extension type associated to open with a third party app by default, the "Install" context menu item won't be displayed,
so the default association for the .cab file type will be restored forcedly
Добавить пункт "Установить" в контекстное меню .cab архивов
Если .cab файлы ассоциированы со сторонним приложением, пункт "Установить" в контекстное меню не будет отображаться,
поэтому принудительно будет восстановлена ассоциация по умолчанию
#>
CABInstallContext -Add

# Remove the "Install" item from the .cab archives context menu (default value)
@@ -1433,7 +1440,7 @@ PreviousVersionsPage -Hide
Перезапустить меню "Пуск"
Пожалуйста, не комментируйте данную функцию
#>
Refresh
RefreshEnvironment

<#
Errors output
@@ -1,5 +1,6 @@
#region Protection

2;2cmb;Checkings -Warning;Checkings;
1;chk;Logging;
1;chk;CreateRestorePoint

@@ -1,5 +1,6 @@
#region Protection

2;2cmb;Checkings -Warning;Checkings;
1;chk;Logging;
1;chk;CreateRestorePoint

@@ -1,5 +1,6 @@
#region Protection

Checkings -Warning;
CreateRestorePoint

#region Privacy & Telemetry

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -5,48 +5,53 @@ INTRODUCTION
------------
Please read this document to understand how to use this program.

BenchTweakGaming.com now works with the farag team.
BenchTweakGaming.com now works with the farag2 team.

This program create a PowerShell script file that you can run to tweak/'Debloat' Windows 10 based on farag2
Windows 10 Sophia Script. It serves as a front-end GUI for the Sophia script (Wrapper).
Windows 10 Sophia Script. It serves as a front-end GUI for the Sophia Script. It is called a Wrapper.

The options are arranged in different tabs and there is a Default preset in the menu so you can debloat a
set of options. You can choose the Default preset first and then add your own choices. You can also create your own
Sophia script to share and open it up. There are ToolTips balloon message popups for detailed info for each item.
Sophia script to share and open it up. There is a Opposite menu option to select the alternative selections.
There are ToolTips balloon message popups for detailed info for each item. There are different languages in menu.

After choosing your options you can directly run the PowerShell script from the program after creating your script.
To do so, open up 'Sophia.ps1' preset, this also gets the path for files to run directly, then fill in your combobox
choices, click the ‘Output PowerShell’ button and then click ‘Run Powershell’ button. The “Run PowerShell” button
creates a PowerShell script called ‘Sophia_edited.ps1’ in the same directory and runs it.
After choosing your options, you can directly run the PowerShell script from the program after creating your script.
To do so, open up 'Sophia.ps1' preset, as this also gets the path for files to run directly, then fill in your choices,
click the ‘Refresh Console’ button and then click ‘Run Powershell’ button. The “Run PowerShell” button
creates a PowerShell script called ‘Sophia_edited.ps1’ in the same directory as 'Sophia.ps1' and runs it.

OR save the PowerShell script as 'Sophia.ps1' with the farag2 Sophia files (see heading FILES below)
OR save the PowerShell script as 'Sophia.ps1' with the farag2 Sophia files (see heading SOPHIA FILES below)
and run it using the following commands.

Launch PowerShell (Run as administrator) and navigate to where your script is.

1. Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
2. ./Sophia.ps1

FILES
-----
There needs to be 6 files for this program to run properly. The txt files are stored in a folder 'Config'.
WRAPPER FILES
-------------
The '.txt' files are stored in a folder 'Config'. There are currently 2 languages for ToolTips: English and Russian
stored in 'Localizations' folder.

►Sophia Script Wrapper.exe : The GUI program.
►data.txt : Contains the options (function names) to select from (usually only 2 options that something is Enable or Disable or ‘LeaveAlone’).
Notice the sections ‘#region Xxx’ and how a semi colon separate the function commands. The last command option in each section does not have a semi colon.
Add or substract from the set.
►dataltsc.txt : LTSC version of data.txt
►default.txt : Contains Default preset to debloat. Click this preset from Option menu in program.
►tooltip.txt : Contains ToolTips for each combobox item. In English.
►README.txt : This documentation.
►Sophia Script Wrapper.exe : The GUI program.
►data.txt : Contains the options (function names) to select from (usually only 2 options that
something is Enable or Disable). Notice the sections ‘#region Xxx’ and how a semi
colon separate the function commands. The last command option in each section does
not have a semi colon. Add or substract from the set.
►dataltsc.txt : LTSC version of data.txt
►default.txt : Contains Default preset to debloat. Click this preset from Option menu in program.
►tooltip.txt : Contains ToolTips for each option.
►README.txt : This documentation.

INSTRUCTIONS
------------
UNZIP all the files and open the 'Sophia.ps1' file to import your preset and to get the path for files to run.
If you do not open 'Sophia.ps1' then you can not run directly the PowerShell script you create and must run
your script manually via PowerShell command line in console.
UNZIP all the files and open the 'Sophia.ps1' preset file to import and to get the path for files to run.
If you do not open 'Sophia.ps1' then you can not run directly the PowerShell script you create (Run PowerShell
button is disabled) and must run your script manually via PowerShell command line in console.

►Sophia.ps1 : farag2 Original Windows PowerShell Script.
SOPHIA FILES
------------
►Sophia.ps1 : farag2 Original Windows PowerShell Script
►Sophia.psd1 : farag2 Windows PowerShell Data File
►Sophia.psm1 : farag2 Windows PowerShell Script Module
►Functions.ps1 : farag2 Windows PowerShell Script to run functions with tab autocompletion
Binary file not shown.