#include int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) { HINSTANCE result; // Launch the file specified on the command-line result = ShellExecute(NULL, "open", lpCmdLine, NULL, NULL, SW_SHOWNORMAL); // Check the result if ((int)result <= 32) { // An error was encountered launching the .HTA, probably because the computer // doesn't have IE5 or greater // Open windows explorer, showing the CD contents ShellExecute(NULL, "explore", "", NULL, NULL, SW_SHOWNORMAL); return 1; } else { // Launched OK return 0; } }