Hlavson
Hlavson

Reputation: 319

Is it possible to create a process with a non-existent Windows account?

I would like to start process as user that non-existent in Windows. Is this possible? If not, can I create temporary account with admin rights, start process as this user and delete that account before application closing? Thanks for suggestions.

Upvotes: 0

Views: 176

Answers (1)

Joel Coehoorn
Joel Coehoorn

Reputation: 415901

You can do this, if the user that originally runs your code is an admin. To make it happen, you need two processes. The first process needs to create the user, kick off your 2nd process using the new account, wait for the 2nd process to finish, and then delete the user.

Upvotes: 1

Related Questions