1, mainly write the registry, in the Hkey_local_machine\\software\\microsoft\\windows\\currentversion\\uninstall below the establishment of a key value, is generally a GUID only
2. Then, under the GUID key value, create many sub-key values.
Example code:
Suppose m_strinstallpath= "C:\\Program Files\\app";
Qsettings *reg = new Qsettings ("hkey_local_machine\\software\\microsoft\\windows\\currentversion\\uninstall\\{ E1878C90-48D0-489A-AEF2-F8574FD881F5} ", Qsettings::nativeformat);
Reg->setvalue ("Norepair", (quint32) 1); Represents no Repair button in Control Panel
Reg->setvalue ("Nomodify", (quint32) 1); Delegate does not change button in Control Panel
Reg->setvalue ("DisplayName", Qstring::fromlocal8bit ("My Program")); The name that appears in Control Panel
Reg->setvalue ("Displayicon", M_strinstallpath + "\\LOGO.ico"); Icons displayed in the Control Panel can also specify the path to the EXE
Reg->setvalue ("DisplayVersion", "1.0"); The version number that is displayed in the Control Panel
Reg->setvalue ("UninstallString", M_struninstallpath + "\\Uninstall.exe"); Control Panel Delete button corresponding to execute EXE, that is, click Delete to run this EXE
Delete reg;
http://blog.csdn.net/itjobtxq/article/details/8971219
Let the program appear in the Control Panel (write the registration form)