Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You appear to have come across a bug in IE as it interacts with UAC. If protected mode is set to on you cannot run IE as an ordinary user in any desktop except the default one. In order to run IE in an alternate desktop you must be running as administrator or have protected mode set to off. This is true for Vista, W2K8 and Win7.</p> <p>As to the other programs that you cannot run, unfortunately I can't confirm anything. I tried upwards of thirty different programs including notepad, calc, all the office apps, visual studio 2005, 2008 and 2010, MSDN help and a number of others and all worked as expected with the noted exception of IE. Is there something truly unusual about your app that might make it behave in an unexpected manner?</p> <p>One note - if you attempt to run an application like this that needs elevation (such as regedit, etc.) it will fail in CreateProcess with the last error set to ERROR_ELEVATION_REQUIRED.</p> <p>For your reference, in case I'm doing something different from you, the code I used is:</p> <pre><code>#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. #endif #include &lt;stdio.h&gt; #include &lt;tchar.h&gt; #include "windows.h" HANDLE PerformOpenApp(TCHAR* appPath); int _tmain(int argc, _TCHAR* argv[]) { HDESK dNew; BOOL closedesk; HANDLE hApp; //Make a new desktop dNew = CreateDesktop(_T("kaka"), 0, 0, 0, DESKTOP_SWITCHDESKTOP| DESKTOP_WRITEOBJECTS| DESKTOP_READOBJECTS| DESKTOP_ENUMERATE| DESKTOP_CREATEWINDOW| DESKTOP_CREATEMENU, NULL); if(!dNew) { _tprintf(_T("Failed to create new desktop !!\n\n")); return 0; } TCHAR path[MAX_PATH]; _putts(_T("Enter the path of a program to run in the new desktop:\n")); _getts(path); while(_tcslen(path) &gt; 0) { hApp = PerformOpenApp(path); if(hApp == 0) { _tprintf(_T("Failed to open app, err = %d\n"), GetLastError()); } else { _tprintf(_T("App pid = %d\n"), GetProcessId(hApp)); _putts(_T("Press any key to close the app.\n")); _gettchar(); TerminateProcess(hApp, 0); CloseHandle(hApp); } _putts(_T("Enter the path of a program to run in the new desktop:\n")); _getts(path); } closedesk = CloseDesktop(dNew); if(!closedesk) { _tprintf(_T("Failed to close new desktop !!\n\n")); return 0; } return 0; } HANDLE PerformOpenApp(TCHAR* appPath) { STARTUPINFO si = {0}; PROCESS_INFORMATION pi; si.cb = sizeof(si); si.lpDesktop = _T("kaka"); BOOL retVal = CreateProcess(NULL, appPath, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &amp;si, &amp;pi); if (retVal) { CloseHandle(pi.hThread); } return pi.hProcess; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload