The image displayed is a dialog created by the shell (explorer.exe). If you programmatically tried to execute a malformed .exe using ShellExecute or CreateProcess the attempt will fail and Windows will return an error code to your application. You can use C++ code to cause the shell to try to execute the malformed .exe. It will then display the desired dialog.
Microsoft's ExecInExplorer Sample can be used for this purpose.