简体   繁体   中英

How to tell that the Setup has an uninstaller?

I have made a small application without setup. Just copy from A to B. Now I wanted to copy also a shortcut (lnk) file in the Windows system to have the application visible as uninstall-able. But when googling for keywords like "link shortcut uninstall windows" there are tonns of unneeded stuff.

Can you provide me any link how to tell Windows the Icon and Application as uninstallable program?

Regards

PS: my question is NOT how to create an lnk file.

I'm not sure if i understood your question, but you can add your program to the registry to make it appear in "Software" (Windows):

Example:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NameOfYourProgram]
"DisplayName"="NameOfYourProgram"
"UninstallString"="path/to/program/NameOfYourUninstaller.exe"

Replace NameOfYourProgram and path/to/program/NameOfYourUninstaller.exe to fit your needs, then save this as a.reg-file and double click it to add it to the registry.

DisplayName and UninstallString are required.

There are some more parameters, which are optional: http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs#Optional_values

You can't turn a.lnk file into an install program with uninstall instructions.

You need to write a simple installer if you want the application to appear in Window's list of installed programs, and be available for uninstall. There are many very simple tools that will let you build an install package—you should use one of these.

In this case, you will need to provide an uninstaller program or script. There's no way to tell the installer database "just delete those files". In that case, you will have to have the user copy both the application and the uninstaller. If they don't, they'll end up with an uninstaller entry that they can't use. For this reason, if you want an uninstaller, it's best to also use an installer. Additionally, it's very rare for applications that you just copy wherever you want to come with uninstallers.

(I suppose that maybe you could use your application run in a special mode as an uninstaller, but I would recommend against this.)

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