I am executing a command in Rascal on Windows 10 (some batch file) which in itself works fine:
import util::ShellExec;
exec("somecommand.bat");
This batch file does some file reads and writes in the current working directory. Through some debugging I have found that the default working directory (|cwd:///|
) is C:\Program Files\Eclipse
and this directory requires elevated rights to be able to write in it. I am trying to change the working directory when executing the command like so:
exec("somecommand.bat", |tmp:///|);
I have tried many variations of directories, but they all produce a CallFailed error without much detail.
How can I execute a command in a different working directory?