Yes, my fault, but should it work in both directions.
Just comment out the exec function.
Publish the code below and run it with cmd.exe
Then you get exactly that what you need, maybe.
Make sure, that the cmd.exe window is active.

Code:
int main(){
	//exec("c:\\windows\\system32\\cmd.exe",NULL); wait(-3);
	while(!sys_active("c:\\windows\\system32\\cmd.exe"))wait(1);
	sys_message("cd /..[Enter]");
	sys_message("cls[Enter]");
	sys_message("dir[Enter]");
}





Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P