Question

My program uses the DXGI API to interact with DXGI Outputs and Adapters.

I am developing it using mostly command line tools, since I don't need any GUI yet.

I am also accessing my PowerShell instance through Bitvise SSH Server - whenever I run my compiled program.exe through this PowerShell instance, as far as I can tell it means that my program is running in Session 0, and that means I only have access to a subset of the DXGI functionality (see Use Direct3D in Session 0 Processes).

Is there any way that I can somehow hack around this requirement? Is there a flag I can pass to program.exe that pops it out of session 0 somehow?

Was it helpful?

Solution

If not via WinAPI and if you can use and launch additional exe to start your program.exe, I think you can try using psexec utility: http://technet.microsoft.com/en-us/sysinternals/bb897553.

I guess there are similar utilities around as well.

EDIT: You can use psexec for starting processes on local box as well, see reference for "computer" argument:

computer Direct PsExec to run the application on the computer or computers specified. If you omit the computer name PsExec runs the application on the local system and if you enter a computer name of "\*" PsExec runs the applications on all computers in the current domain.

Another EDIT I was able to launch notepad.exe in my session emulating what you might have had:

psexec -i 0 psexec -s -i 1 C:\windows\system32\Notepad.exe

This command line starts uses psexec to start itself in session 0 (under system account), then that new psexec calls notepad.exe to be shown in my session (session 1). And it kind of does work. Of course, you'll need admin rights to run these commands.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top