Hi
I am trying to use ShellExecute to launch an application to display a
certain file.
The variation on the theme is that I need to be able to specify the
application to launch and not simply pass the file name (which will
then result in the application associated with the file extension to
launch). I want to prevent the application registered in the system as
being associated with the file extension from opeing the file.
For instance, if MSPaint is associated with "*.bmp" file on my system
but I want to programatically open a file (also having a "*.bmp"
extension) with, say, Photoshop, how can I achieve this?
So far, I am using:
System.Diagnostics.Process p = new Process();
p.StartInfo.RedirectStandardOutput=false;
p.StartInfo.FileName=fileToLaunch;
p.StartInfo.UseShellExecute=false;
p.Start();
p.WaitForExit();
p.Dispose();
But this does not permit me to nominate the application I wish to use
to display the file.
Hope someone can assist.
Thanks
Grant