Archive: Uninstaller Issues


Uninstaller Issues
Hi all,

I'm having a very strange problem with the uninstaller. Here's the flow of the problem:
1) User installs program
2) User uninstalls program, doesn't reboot
3) User installs program again
4) User reboots system.

When the system starts up again the application files the uninstaller was supposed to delete get deleted. Unfortunately, the files it deletes are the newly installed ones! Is there any way to prevent this from happening?

Thanks!


If HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations value exists then you can prompt the user to reboot first.

Stu


But my application isn't the only thing that can write to that key from what I understand, checking for it's existence wouldn't solve my issue completely.

Is there a way I can parse the registry string to see if it contains the file I'm looking for?


Only installations should ever write to that registry key in theory, but if you really have to check the values I'm sure you can loop through the entries using EnumRegValue. I cannot remember the format off the top of my head.

Stu


What about controlling it manually?

the uninstaller could create a file or regkey if he has to reboot. This flag can be checked by the installer (and reset if not needed any more).


But then you'd need to delete the registry value after the reboot (maybe another executable run via RunOnce).

Stu