I am trying to write a Windows console C++ program to run under windows NT Server. This program sole job is to check the console process and change the system drive and directory in the console to a pre-determined setting.
Is there a way to change the program can change the drive and directory and exit out to the new drive and directory.
I have tried chdir and chdrive. Apparantly these functions change the working directory. When the program exits, the drive and directory is not changed.
I am trying to do the same with setting new environment variables.