System.Dia​gnostics.P​rocessStar​tInfo Class Not Working

2 Ansichten (letzte 30 Tage)
joan de la cruz
joan de la cruz am 31 Mai 2017
Kommentiert: Eric Lau am 8 Aug. 2019
I have been using the System.Diagnostics.ProcessStartInfo Class from the MSDN .NET Framework within MATLAB to run some .exe files that are saved in a directory. The Code I am using is below:
startinfo = System.Diagnostics.ProcessStartInfo('cmd.exe',sprintf('/c "%s"',File));
startinfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
proc = System.Diagnostics.Process.Start(startinfo);
This code runs perfectly on my own machine and on many other user's machines as a part of a larger compiled standalone application. However, I've run into an issue recently when users try to run the program on newer machines with Windows 10 installed. The error message seems to indicate that System.Diagnostics is not a recognized command or function. From my research, I've found that this error message is usually due to the .NET Framework not being installed or not the correct version on a particular machine. However, I have verified that at least in once case, the .NET Framework is installed (version 4.6).
Has anyone else experienced this?
  1 Kommentar
Eric Lau
Eric Lau am 8 Aug. 2019
Hi joan,
Did you get this working? I am having a similar issue with a recent windows 10 install.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by