windows-vm-detection-post-wmic

Installation
SKILL.md

Detecting a virtual machine on Windows

Some window features do not survive a VM's graphics driver. A transparent, undecorated window is the usual casualty: it never paints, the process stays alive, and the user sees nothing at all. The fix is to detect the VM and fall back to a normal decorated window — which makes the detection the load-bearing part.

The system fields that carry a hypervisor's brand live in the computer-system record of Windows' management layer. Read them, match against known vendor strings.

// adapted — extracted from the window-construction path, inside a `remember { }`
// Guard first: both probes below are Windows-only commands. Without this the
// app spawns a doomed subprocess on every macOS and Linux launch.
val osName = System.getProperty("os.name", "")
if (!osName.contains("Windows", ignoreCase = true)) return@remember false
Installs
2
GitHub Stars
35
First Seen
6 days ago
windows-vm-detection-post-wmic — maxrave-dev/kotlin-footguns