Link to home
Start Free TrialLog in
Avatar of suma_ds
suma_ds

asked on

CreateProcess

Hey there.

I am writing a program which will create a process in a new desktop. I have the creation of the new desktop under control, all i care about is creating the process.

I understand that it is best to use the windows api function CreateProcess, because it is possible to specify the desktop in the STARTUPINFO structure.

However thanks to all the parameters it requires i am having trouble just getting it to open up cmd in the ordinary desktop.

=========================================================================================

My current goal is to use CreateProcess to open a new CMD shell, in the ordinary desktop, using as little of these parameters possible. I have admin rights so i have absolutely no problem with just requesting full access, rather then spending the time to figure out what access my program will need.  (yes i know im being lazy, but in my defence i have a *massive* workload).

Once i am able to use CreateProcess to open cmd, i will have no problem with adjusting the code to open the process i want in a new desktop.


So my question is this:

What is the easiest way to open CMD using CreateProcess, and using absolute MINIMAL parameters?

An example would also be much appreciated.

Thanks for reading,
Suma
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of suma_ds
suma_ds

ASKER

that helps a lot

cheers :)