@ -2,15 +2,15 @@
. SYNOPSIS
. SYNOPSIS
" Windows 10 Sophia Script " is a PowerShell module for Windows 10 fine-tuning and automating the routine tasks
" Windows 10 Sophia Script " is a PowerShell module for Windows 10 fine-tuning and automating the routine tasks
Version : v5 . 10 . 1
Version : v5 . 10 . 2
Date : 14 . 04 . 2021
Date : 22 . 04 . 2021
Copyright ( c ) 2014 – 2021 farag
Copyright ( c ) 2014 – 2021 farag
Copyright ( c ) 2019 – 2021 farag & oZ-Zo
Copyright ( c ) 2019 – 2021 farag & oZ-Zo
Thanks to all https : / / forum . ru-board . com members involved
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
Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring
. NOTES
. NOTES
@ -3800,11 +3800,11 @@ Unregister-ScheduledTask -TaskName SymbolicLink -Confirm:`$false
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Parameters = @ {
$Parameters = @ {
" TaskName" = " SymbolicLink "
TaskName = " SymbolicLink "
" Principal" = $Principal
Principal = $Principal
" Action" = $Action
Action = $Action
" Settings" = $Settings
Settings = $Settings
" Trigger" = $Trigger
Trigger = $Trigger
}
}
Register-ScheduledTask @Parameters -Force
Register-ScheduledTask @Parameters -Force
}
}
@ -3913,11 +3913,11 @@ Unregister-ScheduledTask -TaskName TemporaryTask -Confirm:`$false
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Parameters = @ {
$Parameters = @ {
" TaskName" = " TemporaryTask "
TaskName = " TemporaryTask "
" Principal" = $Principal
Principal = $Principal
" Action" = $Action
Action = $Action
" Settings" = $Settings
Settings = $Settings
" Trigger" = $Trigger
Trigger = $Trigger
}
}
Register-ScheduledTask @Parameters -Force
Register-ScheduledTask @Parameters -Force
}
}
@ -7783,6 +7783,7 @@ function PinToStart
# Unpin all the Start tiles
# Unpin all the Start tiles
if ( $UnpinAll )
if ( $UnpinAll )
{
{
# Export the current Start layout
Export-StartLayout -Path $Script:StartLayout -UseDesktopApplicationID
Export-StartLayout -Path $Script:StartLayout -UseDesktopApplicationID
[xml] $XML = Get-Content -Path $Script:StartLayout -Encoding UTF8 -Force
[xml] $XML = Get-Content -Path $Script:StartLayout -Encoding UTF8 -Force
@ -9134,7 +9135,7 @@ function SetAppGraphicsPerformance
Add-Type -AssemblyName System . Windows . Forms
Add-Type -AssemblyName System . Windows . Forms
$OpenFileDialog = New-Object -TypeName System . Windows . Forms . OpenFileDialog
$OpenFileDialog = New-Object -TypeName System . Windows . Forms . OpenFileDialog
$OpenFileDialog . Filter = $Localization . EXEFilesFilter
$OpenFileDialog . Filter = $Localization . EXEFilesFilter
$OpenFileDialog . InitialDirectory = " $ {env:ProgramFiles(x86) }"
$OpenFileDialog . InitialDirectory = " ::{20D04FE0-3AEA-1069-A2D8-08002B30309D }"
$OpenFileDialog . Multiselect = $false
$OpenFileDialog . Multiselect = $false
# Focus on open file dialog
# Focus on open file dialog
@ -9386,12 +9387,12 @@ while (`$true)
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Parameters = @ {
$Parameters = @ {
" TaskName " = " Windows Cleanup "
TaskName = " Windows Cleanup "
" TaskPath " = " Sophia Script "
TaskPath = " Sophia Script "
" Principal " = $Principal
Principal = $Principal
" Action " = $Action
Action = $Action
" Description" = $Localization . CleanupTaskDescription
Description = $Localization . CleanupTaskDescription
" Settings " = $Settings
Settings = $Settings
}
}
Register-ScheduledTask @Parameters -Force
Register-ScheduledTask @Parameters -Force
@ -9445,9 +9446,9 @@ while (`$true)
< selection id = " "" 30 "" " content = " "" $( $Localization . HalfHour ) "" " / >
< selection id = " "" 30 "" " content = " "" $( $Localization . HalfHour ) "" " / >
< selection id = " "" 240 "" " content = " "" $( $Localization . FourHours ) "" " / >
< selection id = " "" 240 "" " content = " "" $( $Localization . FourHours ) "" " / >
< / input >
< / 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 = " "" WindowsCleanup: "" " content = " "" $( $Localization . Run ) "" " activationType = " "" protocol "" " / >
< action arguments = " "" dismiss "" " content = " "" $( $Localization . Dismiss ) """ activationType = " "" system "" " / >
< action arguments = " "" dismiss "" " content = " "" """ activationType = " "" system "" " / >
< / actions >
< / actions >
< / toast >
< / toast >
" "" @
" "" @
@ -9465,13 +9466,13 @@ while (`$true)
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm
$Trigger = New-ScheduledTaskTrigger -Daily -DaysInterval 30 -At 9pm
$Parameters = @ {
$Parameters = @ {
" TaskName " = " Windows Cleanup Notification "
TaskName = " Windows Cleanup Notification "
" TaskPath " = " Sophia Script "
TaskPath = " Sophia Script "
" Principal " = $Principal
Principal = $Principal
" Action " = $Action
Action = $Action
" Description" = $Localization . CleanupNotificationTaskDescription
Description = $Localization . CleanupNotificationTaskDescription
" Settings " = $Settings
Settings = $Settings
" Trigger " = $Trigger
Trigger = $Trigger
}
}
Register-ScheduledTask @Parameters -Force
Register-ScheduledTask @Parameters -Force
}
}
@ -9572,13 +9573,13 @@ Get-ChildItem -Path `$env:SystemRoot\SoftwareDistribution\Download -Recurse -For
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Parameters = @ {
$Parameters = @ {
" TaskName" = " SoftwareDistribution "
TaskName = " SoftwareDistribution "
" TaskPath" = " Sophia Script "
TaskPath = " Sophia Script "
" Principal " = $Principal
Principa = $Principal
" Action" = $Action
Action = $Action
" Description" = $Localization . FolderTaskDescription -f " %SystemRoot%\SoftwareDistribution\Download "
Description = $Localization . FolderTaskDescription -f " %SystemRoot%\SoftwareDistribution\Download "
" Settings" = $Settings
Settings = $Settings
" Trigger" = $Trigger
Trigger = $Trigger
}
}
Register-ScheduledTask @Parameters -Force
Register-ScheduledTask @Parameters -Force
}
}
@ -9667,13 +9668,13 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object {`$_.CreationTime
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable
$Settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -StartWhenAvailable
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -RunLevel Highest
$Parameters = @ {
$Parameters = @ {
" TaskName" = " Temp "
TaskName = " Temp "
" TaskPath" = " Sophia Script "
TaskPath = " Sophia Script "
" Principal" = $Principal
Principal = $Principal
" Action" = $Action
Action = $Action
" Description" = $Localization . FolderTaskDescription -f " %TEMP% "
Description = $Localization . FolderTaskDescription -f " %TEMP% "
" Settings" = $Settings
Settings = $Settings
" Trigger" = $Trigger
Trigger = $Trigger
}
}
Register-ScheduledTask @Parameters -Force
Register-ScheduledTask @Parameters -Force
}
}
@ -11809,7 +11810,7 @@ public static void PostMessage()
< audio src = " ms-winsoundevent:notification.default " / >
< audio src = " ms-winsoundevent:notification.default " / >
< actions >
< actions >
< action arguments = " https://t.me/sophia_chat " content = " $( $Localization . Open ) " activationType = " protocol " / >
< 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 >
< / actions >
< / toast >
< / toast >
" @
" @