Reputation: 30645
I am trying to use dumpbin (which I saw from another SO post is installed with Visual Studio) to disassemble a .exe from C#. However, I get an error saying
dumpbin is not recognized as an internal or external command
I am using Visual Studio 2013.
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace Objdump
{
class Program
{
static void Main(string[] args)
{
ProcessStartInfo ProcessInfo;
Process Process;
ProcessInfo = new ProcessStartInfo("cmd.exe", "/K " + "dumpbin /DISASM /out:log.txt MyExe.exe");
ProcessInfo.CreateNoWindow = true;
ProcessInfo.UseShellExecute = true;
Process = Process.Start(ProcessInfo);
}
}
}
Upvotes: 1
Views: 759
Reputation: 29668
The path to dumpbin.exe
needs to be on the PATH
environment variable otherwise you'll need to supply the full path yourself.
For me it happens to be C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
.
Upvotes: 2