简体   繁体   中英

Add application to uninstall or change a program

I have made a standalone exe using py-installer. It's easy to add my exe to the start menu. Simply add a shortcut to my program in the following directory.

os.getenv("PROGRAMDATA") + "\\Microsoft\\Windows\\Start Menu\\Programs"

However, my exe does not show up under Control Panel -> Programs -> Programs and Features. These applications let you right click to uninstall. How can I add my application to this list? I have made a standalone uninstall exe using py-installer that I want to run when the user clicks uninstall. How I can do this in a clean way? I think I have to add some registry keys. I always sign my exes.

1.Use Registry Editor (Regedit.exe) to view the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

2.Double-click the UninstallString registry value, copy the contents of the Value Data box by selecting the contents and pressing CTRL+C, and then quit Registry Editor.

3.Click Start, click Run, press CTRL+V to paste the uninstall command, and then click OK.

Some programs create a folder under the Winnt folder that contains a "$" character at the start and end of the folder name. This folder may contain an uninstall program that you can run to remove the program you previously installed on your computer. Note that these folders are usually hidden, and that you may need to configure Windows Explorer to view hidden files and folders. To do so, right-click Start, click Explore, click Options on the View menu, and then click Show all files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM