Executing another program from C#, do I need to parse the “command line” from registry myself?

后端 未结 4 1380
悲&欢浪女
悲&欢浪女 2020-12-17 05:29

From the registry, for a given file type, I get a string containing something like this:

\"C:\\Program Files\\AppName\\Executable.exe\" /arg1 /arg2 /arg3
         


        
4条回答
  •  Happy的楠姐
    2020-12-17 05:56

    I believe (it has been a while since I did this) that you can just use:

    System.Diagnostics.Process.Start(/*File to open*/);
    

    and it will open the file with the default application if there is one. You did not need to know the application it is going to use.

    Am I understanding what you are looking? Or did I miss something?

提交回复
热议问题