I am trying to find file associations before attempting to launch the file, the best way I could come up to find that association was using the assoc command, my question is can I run this command through some API way? Right now the application launches a cmd window to run the command and then parse the output.
+2
A:
try
{
Process.Start(@"C:\textfile.txt");
}
catch(Win32Exception e)
{
Process.Start(@"C:\");
}
Works for me. Starts the associated application (notepad) with the file. I realize it's not the best way with the exception handling, but it does work.
Moose
2009-02-23 23:04:25
Yep, that's what I was getting at. :thumbup:
JMD
2009-02-23 23:07:52
this should,but the documentation says minimum operating system is windows vista, and i am targetting xp and up....
2009-02-23 23:12:15
Where does it say it requires Vista? All I read in there was that it requires administrative access, "especially under Vista".
JMD
2009-02-23 23:18:05