winutil
winutil copied to clipboard
Fix Task Manager AlwaysOnTop for Win11
Is your feature request related to a problem? Please describe
Currently the code only applies alwaysontop for taskmanager on windows 10 systems
Describe the solution you'd like
Recently found taskmanager saves its settings to : C:\Users\Username\AppData\Local\Microsoft\Windows\TaskManager\settings.json
By simply adding the alwaysontop property we can automate this setting
PowerShell Snippet:
$settingsFile = "$env:LOCALAPPDATA\Microsoft\Windows\TaskManager\settings.json"
#kill taskmanager if its open
Stop-Process -Name Taskmgr -Force -ErrorAction SilentlyContinue
$jsonContent = Get-Content -Path $settingsFile -Raw | ConvertFrom-Json
#add always ontop property
$jsonContent | Add-Member -NotePropertyName 'AlwaysOnTop' -NotePropertyValue $true -Force
$jsonContent | ConvertTo-Json -Depth 10 | Set-Content -Path $settingsFile
Describe alternatives you've considered
Additional context
Issue validation
- [x] I checked for duplicate issues.
- [x] I checked for already existing discussions.
- [x] I checked for an already existing pull request addressing the issue.