【发布时间】:2009-07-28 12:33:21
【问题描述】:
使用Process.Start 和ProcessStartInfo 模拟自动运行CD(或其他媒体,我猜)的最接近的方法是什么?
我已经尝试过明显的事情,例如:
// Just opens the folder
Process.Start("F:");
// Ditto
Process.Start(new ProcessStartInfo("F:") {UseShellExecute = true});
// Throws System.ComponentModel.Win32Exception: No application is associated with the specified file for this operation
Process.Start(new ProcessStartInfo("F:") {UseShellExecute = true, Verb = "autorun"});
我显然可以解析 autorun.inf 文件以计算出所涉及的可执行文件,但我只是想知道是否有更简单的方法。
【问题讨论】:
标签: .net windows system.diagnostics autorun