Rather than using
, which is only provided for backwards-compatibility with VB6, use Process.Start
]. That will return a Process
] object which you can use to monitor the external process.
If the external application has a user interface, you can then call CloseMainWindow
] to close the application gracefully. Otherwise, you can call Kill
] to immediately terminate the application. However, be aware that this will not give the application a chance to shut down properly, and may result in data loss.