What is the closest way to emulate autorunning a CD (or other media, I guess) using Process.Start
and ProcessStartInfo
?
I've tried obvious things like:
// 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"});
I can obviously parse the autorun.inf
file to work out the executable involved, but I'm just wondering if there's a simpler way to do it.