Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Having trouble with process.start

so i want to start process with arguments but it throws me an error (no file in directory found)
heres code:
Process.Start(@"inject.exe example.dll example_process")
This is a bit modified code just for "showcase"
first argument is a dll and second one is process name
basically whole code "works" (i mean it doesnt throw errors in visual studio) but also doesnt work as it throws exception with message "file not found" or something like that

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

replace "inject.exe" with the C:\Path\To\inject.exe:

string exePath = @"C:\Path\To\inject.exe";
string arguments = "example.dll example_process";

try
{
    Process.Start(exePath, arguments);
}
catch (Exception ex)
{
   String Err=ex.Message;  
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading