|
|
|
|
#1 |
|
Junior Member
Join Date: May 2003
Posts: 9
|
Add/Remove Program List Updating
After running the uninstaller, the add/remove program list doesn't update automatically (at least on the one machine I've been testing with so far). From what I've read online, the add/remove list updates right after the uninstall process (spawned by it) exits. From what I've read about NSIS, it copies the uninstaller to a temp directory to simplify deletion of the uninstaller. I'm guessing that a new process is created with the new uninstall.exe image as I've observed that the add/remove program list refreshes right when the uninstall GUI comes up. Questions:
1. Is there a way to get the add/remove program list updated after the uninstaller finishes? Is this being planned? 2. Does anyone have suggestions on how to clearly explain this to the user? I've added a follow-up window (that comes up after pressing "Finish") that tells the user to close and re-open the add/remove program window if the list doesn't automatically refresh. This seems a bit excessive, but I couldn't squeeze the text in the subtitle area. If the user tries to uninstall the program again, Windows tells the user that an error occurred while trying to uninstall my program... A carefully worded phrase might be of general use. Comments? |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Hmm, not sure.
-Stu |
|
|
|
|
|
#3 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
I don't know. I think you actually have refresh the registry and not
the add/remove. As you know, you put a string in the registry so the user can apply there. So for this, you have to refresh the registry; so add/remove re-search for the current strings to be uninstall. * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: May 2003
Posts: 9
|
Thanks for the comments Stu and Lobo Lunar. I now see that I should have been clearer in my post. Clarifications:
1. I think the initial process (that copies uninstall.exe) terminates just after creating the new process with the new image of uninstall.exe. 2. I do update the registry when my program is installed and when it is uninstalled. During the install: code: During the uninstall: code: This part all seems fine as my program shows up in the list after installing and does not show up in new add/remove program windows after uninstalling. (Just the already-present add/remove program window which I use to initiate the uninstall.) I can see the add/remove program list being refreshed just after the uninstaller starts. Since starting this post, I've changed ${MUI_PRODUCT} to PSI-${MUI_PRODUCT} in my installer, to reduce collisions. |
|
|
|
|
|
#5 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
The uninstaller forks another process so you can delete the uninstaller itself. The Add/Remove control panel only updates itself when the first process exits (Windows 9x only). We have yet to find a way to force it to reload.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#6 |
|
Junior Member
|
I just ran into this problem too, and started looking for a solution, when I found this thread.
I just thought of a possible solution to this problem, although it does have another side effect. The first uninstaller could remove the registry settings before forking and exiting. Then when it exits, it will be removed. The forked uninstaller can then put them back if the uninstall is cancelled. So that you won't lose the settings. Of course, it does give a new problem, because now, if you start the uninstaller from add/remove progams and then cancel it, it will not be in the list anymore and you need to reopen or refresh the list manually. But perhaps this behaviour could be set with a flag? Remco |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Jan 2004
Location: London, Ontario, Canada
Posts: 272
|
When I have add/remove programs open and install my product it doesn't get refreshed. However, when I have add/remove programs open and remove the product by clicking the remove button the list gets refreshed. I noticed one thing you were doing in your code, which you shouldn't do in this case, unless you have removed all the children first (ie: the value pairs or subkeys).
Change the following: DeleteRegKey /ifempty HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" to: DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|