2

I have a program file. And I want to add this program into Control Panel Programs like this:enter image description here

How can I do that with C# code or cmd ?

Ali Aliyev
  • 163
  • 9
  • You mean into the add/remove programs list? Use an installer generator to install your program, it will do that automatically for you. – PMF Oct 27 '21 at 11:24
  • I have an .exe file witch downloads my other program from internet and setup it. But this program doesn't add program into Control Panel Programs. I need a code for add this program into Control Panel Programs at the setup time – Ali Aliyev Oct 27 '21 at 11:31

1 Answers1

0

To add an entry to that list, you need to create a subkey in the registry. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ and check the entries there. Basically you need to create a key with a GUID as the name and below that a set of values, the most important being DisplayName and UninstallString.

PMF
  • 14,535
  • 3
  • 23
  • 49
  • I need to do this with C# – Ali Aliyev Oct 27 '21 at 11:49
  • You'll find plenty of information about how to write to the registry with C#. There are a few starting points in this question: https://stackoverflow.com/questions/6338322/how-to-create-a-registry-entry-from-a-c-sharp-application – PMF Oct 27 '21 at 13:11