private string obtenerMD5(string sArchivo)
{
string sMd5 = "";
Process compiler = new Process();
compiler.StartInfo.FileName = "c:\sys\progs\md5 ";
compiler.StartInfo.Arguments = sArchivo;
compiler.StartInfo.UseShellExecute = false;
compiler.StartInfo.RedirectStandardOutput = true;
compiler.Start();
try
{
sMd5 = compiler.StandardOutput.ReadToEnd().Substring(0, 32);
}
catch (ArgumentOutOfRangeException e)
{
MessageBox.Show("No se encontró archivo en ésta ruta: " + sArchivo, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
bHayError = true;
}
return sMd5;
}'
This method receives the address of a file with a .DLL extension which is selected from an OpenDialog. Executing the code from the windows 7 operating system there is no problem, but when you want to try it in XP the error jumps.
I do not know if it could be a permit problem or something else.