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

2 次查看(过去 30 天)
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 个评论
Eric Lau
Eric Lau 2019-8-8
Hi joan,
Did you get this working? I am having a similar issue with a recent windows 10 install.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by