@ -2,15 +2,15 @@
. SYNOPSIS
" Windows 10 Sophia Script " is a PowerShell module for Windows 10 fine-tuning and automating the routine tasks
Version : v5 . 10 . 1
Date : 14 . 04 . 2021
Version : v5 . 10 . 2
Date : 22 . 04 . 2021
Copyright ( c ) 2014 – 2021 farag
Copyright ( c ) 2019 – 2021 farag & oZ-Zo
Thanks to all https : / / forum . ru-board . com members involved
. DESCRIPTION
. NOTES
Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring
. NOTES
@ -3809,11 +3809,11 @@ Unregister-ScheduledTask -TaskName SymbolicLink -Confirm:`$false
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Parameters = @ {
" TaskName" = " SymbolicLink "
" Principal" = $Principal
" Action" = $Action
" Settings" = $Settings
" Trigger" = $Trigger
TaskName = " SymbolicLink "
Principal = $Principal
Action = $Action
Settings = $Settings
Trigger = $Trigger
}
Register-ScheduledTask @Parameters -Force
}
@ -3927,11 +3927,11 @@ Unregister-ScheduledTask -TaskName TemporaryTask -Confirm:`$false
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Parameters = @ {
" TaskName" = " TemporaryTask "
" Principal" = $Principal
" Action" = $Action
" Settings" = $Settings
" Trigger" = $Trigger
TaskName = " TemporaryTask "
Principal = $Principal
Action = $Action
Settings = $Settings
Trigger = $Trigger
}
Register-ScheduledTask @Parameters -Force
}
@ -7796,6 +7796,7 @@ function PinToStart
# Unpin all the Start tiles
if ( $UnpinAll )
{
# Export the current Start layout
Export-StartLayout -Path $Script:StartLayout -UseDesktopApplicationID
[xml] $XML = Get-Content -Path $Script:StartLayout -Encoding UTF8 -Force
@ -8039,7 +8040,7 @@ public static string GetString(uint strId)
. NOTES
Load The WinRT . Runtime . dll and Microsoft . Windows . SDK . NET . dll assemblies to the current session in order to get localized UWP apps names
CsWinRT v1 . 2 . 2
CsWinRT v1 . 2 . 5
Microsoft . Windows . SDK . NET 10 . 0 . 19041 . 16
. LINK
@ -8448,11 +8449,11 @@ function UninstallUWPApps
RestoreUWPAppsUWPApps
. NOTES
UWP apps can be restored only if they were uninstalled only for the current user
UWP apps can be restored only if they were uninstalled for the current user
. NOTES
Load The WinRT . Runtime . dll and Microsoft . Windows . SDK . NET . dll assemblies to the current session in order to get localized UWP apps names
CsWinRT v1 . 2 . 2
CsWinRT v1 . 2 . 5
Microsoft . Windows . SDK . NET 10 . 0 . 19041 . 16
. LINK
@ -9170,7 +9171,7 @@ function SetAppGraphicsPerformance
Add-Type -AssemblyName System . Windows . Forms
$OpenFileDialog = New-Object -TypeName System . Windows . Forms . OpenFileDialog
$OpenFileDialog . Filter = $Localization . EXEFilesFilter
$OpenFileDialog . InitialDirectory = " $ {env:ProgramFiles(x86) }"
$OpenFileDialog . InitialDirectory = " ::{20D04FE0-3AEA-1069-A2D8-08002B30309D }"
$OpenFileDialog . Multiselect = $false
# Focus on open file dialog
@ -9422,12 +9423,12 @@ while (`$true)
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Parameters = @ {
" TaskName " = " Windows Cleanup "
" TaskPath " = " Sophia Script "
" Principal " = $Principal
" Action " = $Action
" Description" = $Localization . CleanupTaskDescription
" Settings " = $Settings
TaskName = " Windows Cleanup "
TaskPath = " Sophia Script "
Principal = $Principal
Action = $Action
Description = $Localization . CleanupTaskDescription
Settings = $Settings
}
Register-ScheduledTask @Parameters -Force
@ -9481,9 +9482,9 @@ while (`$true)
< selection id = " "" 30 "" " content = " "" $( $Localization . HalfHour ) "" " / >
< selection id = " "" 240 "" " content = " "" $( $Localization . FourHours ) "" " / >
< / input >
< action activationType = " "" system "" " arguments = " "" snooze "" " hint-inputId = " "" SnoozeTimer "" " content = " "" $( $Localization . Snooze ) "" " id = " "" test-snooze "" " / >
< action activationType = " "" system "" " arguments = " "" snooze "" " hint-inputId = " "" SnoozeTimer "" " content = " " id = " "" test-snooze "" " / >
< action arguments = " "" WindowsCleanup: "" " content = " "" $( $Localization . Run ) "" " activationType = " "" protocol "" " / >
< action arguments = " "" dismiss "" " content = " "" $( $Localization . Dismiss ) """ activationType = " "" system "" " / >
< action arguments = " "" dismiss "" " content = " "" """ activationType = " "" system "" " / >
< / actions >
< / toast >
" "" @
@ -9501,13 +9502,13 @@ while (`$true)
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm
$Parameters = @ {
" TaskName " = " Windows Cleanup Notification "
" TaskPath " = " Sophia Script "
" Principal " = $Principal
" Action " = $Action
" Description" = $Localization . CleanupNotificationTaskDescription
" Settings " = $Settings
" Trigger " = $Trigger
TaskName = " Windows Cleanup Notification "
TaskPath = " Sophia Script "
Principal = $Principal
Action = $Action
Description = $Localization . CleanupNotificationTaskDescription
Settings = $Settings
Trigger = $Trigger
}
Register-ScheduledTask @Parameters -Force
}
@ -9608,13 +9609,13 @@ Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -For
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Parameters = @ {
" TaskName" = " SoftwareDistribution "
" TaskPath" = " Sophia Script "
" Principal " = $Principal
" Action" = $Action
" Description" = $Localization . FolderTaskDescription -f " %SystemRoot%\SoftwareDistribution\Download "
" Settings" = $Settings
" Trigger" = $Trigger
TaskName = " SoftwareDistribution "
TaskPath = " Sophia Script "
Principa = $Principal
Action = $Action
Description = $Localization . FolderTaskDescription -f " %SystemRoot%\SoftwareDistribution\Download "
Settings = $Settings
Trigger = $Trigger
}
Register-ScheduledTask @Parameters -Force
}
@ -9703,13 +9704,13 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Parameters = @ {
" TaskName" = " Temp "
" TaskPath" = " Sophia Script "
" Principal" = $Principal
" Action" = $Action
" Description" = $Localization . FolderTaskDescription -f " %TEMP% "
" Settings" = $Settings
" Trigger" = $Trigger
TaskName = " Temp "
TaskPath = " Sophia Script "
Principal = $Principal
Action = $Action
Description = $Localization . FolderTaskDescription -f " %TEMP% "
Settings = $Settings
Trigger = $Trigger
}
Register-ScheduledTask @Parameters -Force
}
@ -11829,8 +11830,8 @@ public static void PostMessage()
. NOTES
Load The WinRT . Runtime . dll and Microsoft . Windows . SDK . NET . dll assemblies to the current session in order to get localized UWP apps names
CsWinRT v1 . 2 . 1
Microsoft . Windows . SDK . NET 10 . 0 . 19041 . 15
CsWinRT v1 . 2 . 5
Microsoft . Windows . SDK . NET 10 . 0 . 19041 . 16
. LINK
https : / / github . com / microsoft / CsWinRT
@ -11854,7 +11855,7 @@ public static void PostMessage()
< audio src = " ms-winsoundevent:notification.default " / >
< actions >
< action arguments = " https://t.me/sophia_chat " content = " $( $Localization . Open ) " activationType = " protocol " / >
< action arguments = " dismiss " content = " $( $Localization . Dismiss ) " activationType = " system " / >
< action arguments = " dismiss " content = " " activationType = " system " / >
< / actions >
< / toast >
" @