Find total number of file to be recovered
Posted: 21 Oct 2013, 17:22
Hello All,
I need to find total number of file to be recovered from an USB drive. I am trying to get standard output method but it's not working. It throws an error, "The requested operation requires elevation".
ProcessStartInfo objStartInfo = new ProcessStartInfo("Photo_Rec.exe");
objStartInfo.Arguments = "/d D:\\ProgramFile\\Recover\\recagent /cmd usb options,mode_ext2,fileopt,everything,disable,jpg,enable,png,enable,bmp,enable,gif,enable,doc,enable,pdf,enable,txt,enable,mp3,enable,mov,enable,freespace,search";
try
{
Process objRecoverProcess = new Process();
objStartInfo.RedirectStandardError = true;
objStartInfo.RedirectStandardOutput = true;
objStartInfo.UseShellExecute = false;
objRecoverProcess = Process.Start(objStartInfo);
StreamReader adbOutput = objRecoverProcess.StandardOutput;
objRecoverProcess.WaitForExit();
}
catch
{
}
I have used the above code.
Anybody let me know the mistake in this code?
Thanks,
Damu
I need to find total number of file to be recovered from an USB drive. I am trying to get standard output method but it's not working. It throws an error, "The requested operation requires elevation".
ProcessStartInfo objStartInfo = new ProcessStartInfo("Photo_Rec.exe");
objStartInfo.Arguments = "/d D:\\ProgramFile\\Recover\\recagent /cmd usb options,mode_ext2,fileopt,everything,disable,jpg,enable,png,enable,bmp,enable,gif,enable,doc,enable,pdf,enable,txt,enable,mp3,enable,mov,enable,freespace,search";
try
{
Process objRecoverProcess = new Process();
objStartInfo.RedirectStandardError = true;
objStartInfo.RedirectStandardOutput = true;
objStartInfo.UseShellExecute = false;
objRecoverProcess = Process.Start(objStartInfo);
StreamReader adbOutput = objRecoverProcess.StandardOutput;
objRecoverProcess.WaitForExit();
}
catch
{
}
I have used the above code.
Anybody let me know the mistake in this code?
Thanks,
Damu