-3
        string ext = ".ext";
        RegistryKey key = Registry.ClassesRoot.CreateSubKey(ext);
        MessageBox.Show(exePath);
        key.SetValue("", "My Project");
        key.Close();

        key = Registry.ClassesRoot.CreateSubKey(ext + "\\Shell\\Open\\command");
        //key = key.CreateSubKey("command");

        key.SetValue("", "\"" + Application.ExecutablePath + "\" \"%L\"");
        key.Close();

        key = Registry.ClassesRoot.CreateSubKey(ext + "\\DefaultIcon");
        key.SetValue("", Application.StartupPath + "\\icon.ico");
        key.Close();

i wanna create a new file extension like "prproj" primiere pro in c#,for example you save that file and you wanna open it again and when you clicked at file, it will be opened in your application and also, i want to know how to give a icon file to that file?

please help!

1 Answers1

0

You can use Setup Wizard, in it you can change the parameter that is responsible for the file extension belonging to your program.

enter image description here

  • i dont have this panels you have, how did you do that ? – mahdi noroozi Jan 19 '22 at 06:21
  • @mahdi-noroozi, in the _Solution Explorer_, you need to select (make active) the project created using the **Setup Wizard**. After that, you will have the wizard project management buttons on the top panel. – Hopex Development Jan 26 '22 at 18:35