I'm trying to create a program that silently installs multiple programs
Some programs that use simple "/ Q" parameters I got and worked out.
but has a program that the parameter is large and can not solve
I can not set a fixed path because I want my program to work in any directory or folder
The command is this: vcredist_x86.exe / q: a /c:"VCREDI~1.EXE / q: a / c: "msiexec / i vcredist.msi / qn" ""
via cmd install perfectly, just can not do this via c #
I've tried several ways but with no success, an example of a way I did not work:
ProcessStartInfo startInfo = new ProcessStartInfo()
{
string pathApp = "Visual C++05\vcredist_x86.exe";
FileName = Path.Combine(Environment.CurrentDirectory, pathApp),
Arguments = " /q:a /c:\"VCREDI~1.EXE / q:a / c:\"\"msiexec / i vcredist.msi / qn\"\" \"",
WorkingDirectory = Environment.CurrentDirectory,
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = true
};
using (Process exeProcess = Process.Start(startInfo))
{
exeProcess.EnableRaisingEvents = true;
exeProcess.WaitForExit(60000);
}
The error that he says that the file was not found or he starts to install showing on the screen without being silent, as if he had ignored the parameter
OBS : I tried several variations of this code, passing the complete path of the program, tried to create a bat and run the bat but tbm did not give
What am I doing wrong?