System.Diagnostics.ProcessStartInfo Class Not Working
2 views (last 30 days)
Show older comments
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 Comment
Eric Lau
on 8 Aug 2019
Hi joan,
Did you get this working? I am having a similar issue with a recent windows 10 install.
Answers (0)
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!