@ -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
@ -3800,11 +3800,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
}
@ -3913,11 +3913,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
}
@ -7783,6 +7783,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
@ -9134,7 +9135,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
@ -9386,12 +9387,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
@ -9445,9 +9446,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 >
" "" @
@ -9465,13 +9466,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
}
@ -9572,13 +9573,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
}
@ -9667,13 +9668,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
}
@ -11809,7 +11810,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 >
" @