© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•14mo ago
Ace

Executing explorer.exe into virtualdesktop

First of all, Happy New Year!
I'm working on a project in C#, I'm using the CreateDesktop API to create a desktop and draw it to a PictureBox. However, there's an issue: the explorer.exe is not loading into the virtual desktop it spawns into the default desktop, and nothing is being drawn into the PictureBox. The process is running in admin mode.

I believe the flow is as follows:

Admin process -> CreateProcessW (using startup info to select the desktop)
Admin explorer (but it doesn't run in admin mode due to security restrictions, so it relaunches)
CreateProcessW (forcing the relaunch into the default desktop)
User explorer (now running on the default desktop instead of the hidden one)

This is my failed method code to fix issue:
https://www.codebin.cc/code/cm5ee6tm50001mq03bb882yhv:2Z9hkuSY94ZEhCGgAm5i9yFCnaJ5qnyqDsKScZAhG9Ax
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Merge dll into exe
C#CC# / help
3y ago
✅ executing
C#CC# / help
13mo ago
✅ solution explorer
C#CC# / help
12mo ago