Hi all,
I have to write a tool which starts and runs on the shell (cmd.exe). It does some logic, takes some input from the user and finishes. Right before it finishes it should change the directory from which it was called. I have no clue if this is even possible. I tried to get the parent process and alter it this way, which results in crashes...
C:\Home>my_tool.exe
...doing some stuff...
...doing some stuff...
...doing some stuff...
...some user input....
...doing some stuff...
...finishing...
D:\Data\Documents>
Any Idea how to do this?
I have to write a tool which starts and runs on the shell (cmd.exe). It does some logic, takes some input from the user and finishes. Right before it finishes it should change the directory from which it was called. I have no clue if this is even possible. I tried to get the parent process and alter it this way, which results in crashes...
C:\Home>my_tool.exe
...doing some stuff...
...doing some stuff...
...doing some stuff...
...some user input....
...doing some stuff...
...finishing...
D:\Data\Documents>
Any Idea how to do this?



- carpe noctem
, at least not in a clean way...




