1
I need to execute a command on CMD that I pass the parameters via C# for example:
"C:\Program Files\MySQL\MySQL Workbench 8.0 CE\mysqldump.exe" --column-statistics=0 -uroot -p1234 -hservidor -P3306 bancomysql > D:\banco.sql
but I don’t want to run this command via . bat or type myself in CMD. I would like C# to pass this command and open the CMD or the Shell to do so.
I don’t know how I would do this command via Shell but I heard it would be easier to call the Shell via C#
That is, in the program C# I want to press a button that calls this command and open the CMD or the Shell and run this command for me.
the path is right ? normally I use mysqldump.exe from where mysql is installed. not from Workbench
– Bulfaitelo
yes the command works directly from a . bat or CMD, but I don’t know how to do this in C# directly
– Pedro Stelita Vieira
C# I don’t know how to help anymore, but check out this link here: https://stackoverflow.com/questions/5519328/executing-file-in-c-sharp
– Bulfaitelo