SessionInformation
The itty-bitty key HKCU\SessionInformation contains a single value. The REG_DWORD value ProgramCount indicates how many programs are running in the foreground. Each time you open a program on the desktop, Windows increments this value. Each time you close a foreground program, Windows decrements this value.