Here's the code I use:
- Code: Select all
Process myProcess = new Process();
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo();
myProcessStartInfo.FileName = Server.MapPath("ImageDB.exe");
myProcessStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
myProcessStartInfo.CreateNoWindow = true;
myProcessStartInfo.UseShellExecute = false;
myProcessStartInfo.RedirectStandardOutput = true;
myProcessStartInfo.Arguments = "/server:dblocation /database:customerdb /username:user /password:password /quiet";
myProcess.StartInfo = myProcessStartInfo;
StreamReader myStreamReader = myProcess.StandardOutput;
string myString = myStreamReader.ReadToEnd();
when I run the code, I get the following error:
"Red Gate SQL Packager 'ImageDB' Error: File or assembly name ImageDB.exe, or one of its dependencies, was not found. "
I verified that the file is in the correct directory and that my process is pointing to that directory.
Does anyone know what's going on?
Thanks in advance!