Open
Description
Microsoft PowerToys version
0.78.0
Installation method
GitHub
Running as admin
No
Area(s) with issue?
Always on Top
Steps to reproduce
attempting to close powershell 7.4.1 with always on top enabled caused it to freeze, and had to be closed with task manager. The log file had [2024-02-08 23:25:40.006516] [p-12468] [t-12472] [error] Failed to unpin window, Invalid window handle.
I believe this may be because it detects the other command line program and pins that instead, and when the command finishes, the console is the same, so it doesn't delatch from the original process before closing the app.
- start powershell 7.4.1 normally from the start menu
- run a custom script I created for downloading a stream, and enable always on top midway through operation. The command finished after cancelling with ctrl+c, and I closed powershell with the x in the corner. The console went away, and the window controls(?) stayed, as shown in the image.
✔️ Expected Behavior
The application to close properly without error
❌ Actual Behavior
The console disappeared, leaving the window controls
Other Software
Powershell 7.4.1
custom powershell script ran with parameters -time 00:00-15:00 -link https://www.twitch.tv/##### -number [any number] -topic cats
:
function turtlesong {
param(
[Parameter(Mandatory)]
[string]$time,
[Parameter(Mandatory)]
[string]$link,
[Parameter(Mandatory)]
[string]$number,
[string]$topic
)
if ("$topic" -ne "") {
$topic = ".($topic)"
}
if ((Test-Path "C:\Users\#####\turtlesongs\song.$number$topic.mp4") -eq $false) {
C:\Users\#####\.stacher/youtube-dl --embed-metadata --no-check-certificate --ffmpeg-location C:\Windows\ --download-sections "*$time" -o "C:\Users\#####\turtlesongs\song.$number$topic.mp4" $link
$choice = Read-Host "Use ffmpeg and convert to audio? (y/n)"
if ($choice -eq "y") {
ffmpeg -i "C:\Users\#####\turtlesongs\song.$number$topic.mp4" -vn -c:a copy "C:\Users\#####\turtlesongs\audio\song.$number$topic.m4a"
} else {
write-host "Not converting to audio."
}
} else {
Write-Warning -Message "Song with number ""$number"" already downloaded."
}
}
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status
Activity