Let the program appear in the Control Panel (write the registration form)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.