[Bug]: WVDH Window Appears In Alt+Tab
What happened?
Hello! Thanks for making the wonderful WVDH. I use it a lot.
I have noticed that when using WVDH 2.0, a window called "Windows Virtual Desktop Manager" appears when alt+tab is pressed.
Additional information: the issue does not occur when using WVDH 1.7.
WVDH Version
2.0
Windows Version
Windows 11 Pro 24H2 build 26100.4351
Relevant log output
Windows 10, same problem. Have to close this window manually
Windows 11 Pro 24H2 (26100.4770) - same inconvenience
Same here
Windows 11
Came to check if this was hopefully fixed but unfortunately it still happens.
I created this small AutoHotKey launcher script to launch the program and hide it from Alt + Tab /. Win + Tab
Run, "C:\Program Files (x86)\Windows Virtual Desktop Helper\WindowsVirtualDesktopHelper.exe"
Sleep, 2000 ; Waits 2 seconds for the program to fully start
WinHide, Windows Virtual Desktop Manager
ExitApp ; Exits the script after hiding the window
I placed the AHK script in my startup folder so it runs on startup.
Thanks for this - I noticed this popped up as well recently. Don't know what windows changed but I am sure I can fix it...
Came to check if this was hopefully fixed but unfortunately it still happens.
I created this small AutoHotKey launcher script to launch the program and hide it from Alt + Tab /. Win + Tab
Run, "C:\Program Files (x86)\Windows Virtual Desktop Helper\WindowsVirtualDesktopHelper.exe" Sleep, 2000 ; Waits 2 seconds for the program to fully start WinHide, Windows Virtual Desktop Manager ExitApp ; Exits the script after hiding the windowI placed the AHK script in my startup folder so it runs on startup.
ãåèã« ps1ã¹ã¯ãªãããç½®ãã¦ããã¾ãã
# launch_and_hide.ps1
# Windows Virtual Desktop Helperãèµ·åãã¦ã¦ã£ã³ãã¦ãé表示ã«ãã
# 管çè
権éã§å®è¡ããã¦ããããã§ãã¯
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
[Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Host "管çè
権éãå¿
è¦ã§ãã管çè
権éã§åå®è¡ãã¾ã..." -ForegroundColor Yellow
# PowerShell Coreãå©ç¨å¯è½ããã§ãã¯
$pwshPath = (Get-Command pwsh -ErrorAction SilentlyContinue).Source
$powershellExe = if ($pwshPath) { "pwsh" } else { "powershell" }
Start-Process $powershellExe -Verb RunAs -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`""
exit
}
Write-Host "Windows Virtual Desktop Helperãèµ·åä¸..." -ForegroundColor Cyan
# Win32 APIã®å®ç¾©
if (-not ([System.Management.Automation.PSTypeName]'WinAPI').Type) {
Add-Type @"
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Text;
public class WindowInfo {
public IntPtr Handle;
public string Title;
public uint ProcessId;
public bool Visible;
}
public class WinAPI {
[DllImport("user32.dll")]
public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
[DllImport("user32.dll")]
public static extern bool EnumWindows(EnumWindowsProc proc, IntPtr lParam);
[DllImport("user32.dll")]
public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint processId);
[DllImport("user32.dll")]
public static extern bool IsWindowVisible(IntPtr hWnd);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
public delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
private static List<WindowInfo> windows = new List<WindowInfo>();
public static List<WindowInfo> GetWindowsByProcessId(uint processId) {
windows.Clear();
EnumWindows(delegate(IntPtr hWnd, IntPtr lParam) {
uint pid;
GetWindowThreadProcessId(hWnd, out pid);
if (pid == processId) {
StringBuilder title = new StringBuilder(256);
GetWindowText(hWnd, title, 256);
windows.Add(new WindowInfo {
Handle = hWnd,
Title = title.ToString(),
ProcessId = pid,
Visible = IsWindowVisible(hWnd)
});
}
return true;
}, IntPtr.Zero);
return windows;
}
}
"@
}
# ããã°ã©ã ãèµ·å
Start-Process "C:\Program Files (x86)\Windows Virtual Desktop Helper\WindowsVirtualDesktopHelper.exe"
# ã¦ã£ã³ãã¦ãè¦ã¤ããã¾ã§å¾
æ©
Write-Host "ã¦ã£ã³ãã¦ã®èµ·åãå¾
æ©ä¸..." -ForegroundColor Yellow
Start-Sleep -Seconds 2
for ($i = 1; $i -le 10; $i++) {
$proc = Get-Process -Name "WindowsVirtualDesktopHelper" -ErrorAction SilentlyContinue | Select-Object -First 1
if ($proc) {
$windows = [WinAPI]::GetWindowsByProcessId($proc.Id)
# Virtual Desktopãå«ãã¦ã£ã³ãã¦ã¾ãã¯è¡¨ç¤ºå¯è½ãªã¦ã£ã³ãã¦ãæ¢ã
$target = $windows | Where-Object { $_.Title -like "*Virtual Desktop*" } | Select-Object -First 1
if (-not $target) {
$target = $windows | Where-Object { $_.Visible } | Select-Object -First 1
}
if ($target) {
[WinAPI]::ShowWindow($target.Handle, 0) | Out-Null
Write-Host "ã¦ã£ã³ãã¦ãé表示ã«ãã¾ãã: '$($target.Title)'" -ForegroundColor Green
exit 0
}
}
Start-Sleep -Milliseconds 500
}
Write-Host "ã¦ã£ã³ãã¦ãè¦ã¤ããã¾ããã§ãã" -ForegroundColor Red