Jump to content
Sign in to follow this  

Run a process on a different desktop possibel ?

Recommended Posts


I was looking if it is possible to run a program on a different desktop like the winlogon runs in the winlogon-desktop, the screensaver in the screensaver-desktop and all other programs runs int the windows-desktop.

This way the user don't have access to the windows system until the program has finished.

Why i need this ? Because i have to run the program in admin content after a reboot.

in program code c++ it would something like this :

// Save original desktop
  hOriginalThread = GetThreadDesktop(GetCurrentThreadId());
  hOriginalInput = OpenInputDesktop(0, FALSE, DESKTOP_SWITCHDESKTOP);

  // Create a new Desktop and switch to it
  hNewDesktop = CreateDesktop("NewDesktopName", NULL, NULL, 0, GENERIC_ALL, NULL);

  // Execute thread/process in the new desktop

  // Restore original desktop

  // Close the Desktop

Any help would be welcome...

Share this post

Link to post
Share on other sites

Not sure if I follow you there but can't you just lock it?

Edited by Uten

Share this post

Link to post
Share on other sites


No that is not what i am looking for.

When the programs run in admin content i don't want a user to mess arround with the system because an administrator is logged on for installation of the software. Therefore i have to disable some functionality of windows

i know i could block keyboard and mouse but then i have to reboot again

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.