diff --git a/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/ALeappAnalyzerIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/ALeappAnalyzerIngestModule.java index d9f673ac36..1332ff40cd 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/ALeappAnalyzerIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/ALeappAnalyzerIngestModule.java @@ -289,12 +289,13 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule { private ProcessBuilder buildaLeappCommand(Path moduleOutputPath, String sourceFilePath, String aLeappFileSystemType) { ProcessBuilder processBuilder = buildProcessWithRunAsInvoker( - "\"" + aLeappExecutable + "\"", //NON-NLS + aLeappExecutable.getAbsolutePath(), //NON-NLS "-t", aLeappFileSystemType, //NON-NLS "-i", sourceFilePath, //NON-NLS "-o", moduleOutputPath.toString(), "-w" ); + processBuilder.directory(moduleOutputPath.toFile()); processBuilder.redirectError(moduleOutputPath.resolve("aLeapp_err.txt").toFile()); //NON-NLS processBuilder.redirectOutput(moduleOutputPath.resolve("aLeapp_out.txt").toFile()); //NON-NLS return processBuilder; @@ -303,9 +304,11 @@ public class ALeappAnalyzerIngestModule implements DataSourceIngestModule { private ProcessBuilder buildaLeappListCommand(Path moduleOutputPath) { ProcessBuilder processBuilder = buildProcessWithRunAsInvoker( - "\"" + aLeappExecutable + "\"", //NON-NLS + aLeappExecutable.getAbsolutePath(), //NON-NLS "-p" ); + // leapp process creates a text file in addition to outputting to stdout. + processBuilder.directory(moduleOutputPath.toFile()); processBuilder.redirectError(moduleOutputPath.resolve("aLeapp_paths_error.txt").toFile()); //NON-NLS processBuilder.redirectOutput(moduleOutputPath.resolve("aLeapp_paths.txt").toFile()); //NON-NLS return processBuilder; diff --git a/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/ILeappAnalyzerIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/ILeappAnalyzerIngestModule.java index 4d8328ce3d..f522d2fdd1 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/ILeappAnalyzerIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/ILeappAnalyzerIngestModule.java @@ -289,11 +289,12 @@ public class ILeappAnalyzerIngestModule implements DataSourceIngestModule { private ProcessBuilder buildiLeappCommand(Path moduleOutputPath, String sourceFilePath, String iLeappFileSystemType) { ProcessBuilder processBuilder = buildProcessWithRunAsInvoker( - "\"" + iLeappExecutable + "\"", //NON-NLS + iLeappExecutable.getAbsolutePath(), //NON-NLS "-t", iLeappFileSystemType, //NON-NLS "-i", sourceFilePath, //NON-NLS "-o", moduleOutputPath.toString() ); + processBuilder.directory(moduleOutputPath.toFile()); processBuilder.redirectError(moduleOutputPath.resolve("iLeapp_err.txt").toFile()); //NON-NLS processBuilder.redirectOutput(moduleOutputPath.resolve("iLeapp_out.txt").toFile()); //NON-NLS return processBuilder; @@ -309,9 +310,11 @@ public class ILeappAnalyzerIngestModule implements DataSourceIngestModule { private ProcessBuilder buildiLeappListCommand(Path moduleOutputPath) { ProcessBuilder processBuilder = buildProcessWithRunAsInvoker( - "\"" + iLeappExecutable + "\"", //NON-NLS + iLeappExecutable.getAbsolutePath(), //NON-NLS "-p" ); + // leapp process also outputs a file to the working directory in addition to stdout. + processBuilder.directory(moduleOutputPath.toFile()); processBuilder.redirectError(moduleOutputPath.resolve("iLeapp_paths_error.txt").toFile()); //NON-NLS processBuilder.redirectOutput(moduleOutputPath.resolve("iLeapp_paths.txt").toFile()); //NON-NLS return processBuilder;