I heard that java code cannot be to add into batch file in a comment on my previous question:
But is there any alternatives to it?
Is it possible to add java cod
No, you cannot add Java code to batch file.
In Java,
public class TestRun1
{
public static void main(String args[])
{
System.out.println(m.walkin(new File(d.detectDrive())));
}
}
In batch file:
set tmp_file=%TEMP%\%~n0.tmp
rem ----set as per your java directory-------
set java_path=C:\Program Files\Java\jdk1.6.0_43\bin
"%java_path%\java" TestRun1> "%tmp_file%"
set /P p=<"%tmp_file%"
echo %p%
rem -----now p has the value, use it in the command--------
vol231.exe -f %p% imageinfo > Volatility.txt
vol231.exe -f %p% --profile=Win7SP0x86 pslist >> Volatility.txt
vol231.exe -f %p% --profile=Win7SP0x86 dlllist > Volatility.txt
vol231.exe -f %p% --profile=Win7SP0x86 iehistory >> Volatility.txt
vol231.exe -f %p% --profile=Win7SP0x86 svcscan >> Volatility.txt
vol231.exe -f %p% --profile=Win7SP0x86 hivelist >> Volatility.txt
vol231.exe -f %p% --profile=Win7SP0x86 filescan >> Volatility.txt
vol231.exe -f %p% --profile=Win7SP0x86 netscan >> Volatility.txt
pause
del /F "%tmp_file%"