@d-healey I knew that there was a function thought it was startAsProcess.
Thanks alot, its just to damn hard to find anything in the docs.
Here is a code snippet which gets the current selected Theme in MacOS.
const var b = Engine.createBackgroundTask("GetDesktopTheme");
b.runProcess('defaults', ['read', '-g', 'AppleInterfaceStyle'], function(thread, isFinished, data) {
Console.print(data);
});