Archive: Add or Remove Programs blocked after uninstall


Add or Remove Programs blocked after uninstall
Hi!

I wrote a small test installer to simulate my problem.

The installation works fine, but the removal part has a bad result.

I started the "Add or Remove Programs" in Control Panel and I selected the remove button at my program.
During the removal action it executed the notepad.exe.

After finishing the the uninstallation I didn't was able to use the "Add or Remove Programs" until I killed the notepad.exe.


Windows does this by design (Some crappy uninstallers spawn new processes without waiting)

What exactly is it that you want to do? open a url? I came up with a hacky solution to that in http://forums.winamp.com/showthread....hreadid=272793

You might want to look into using DDE or something like that so you don't start a new process (Using DDE will only work with explorer.exe since you "know" its probably running)

There is another possible solution I have not explored, windows uses a job object to keep track of all your uninstall processes, but it IS possible to get out of a job group unless the ARP app restricts that (I see no reason why they would do that, the job object in this case is for older uninstallers, and not security)


My original installer has a Modify/Repair/Remove featur like in several InstallShield installer.

In Modify mode some components can be add or remove and it restarts a small system tray application.


I got it working now, hold on as I make a wiki page

edit: http://nsis.sourceforge.net/Escape_A...th_New_Process (Not sure if I would call this production ready or anything like that, I did not do alot of testing, you have been warned)


The Escape ARP Job With New Process soulution works fine on Win2000/WinXP/Win2003 systems, but on Vista it fails.

The gui part of the add/remove can be closed, but you can't do any other modifications before kill the new process or restart .


Vista might be using a different name for the job, or has secured the job so you can't access it. Or are you saying it sort of works on vista? I don't really understand what you mean.


I modified the sample script with your "Escape ARP Job With New Process" solution.

On Vista the add/remove doesn't blocked after uninstallation, but I cannot remove any other program before closing the notepad.exe.

I didn't find any job object in the related processes with process explorer (run as adminstrator).