Old 30th June 2009, 14:57   #1
wintergreen53
Junior Member
 
Join Date: Jun 2009
Posts: 2
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!
wintergreen53 is offline   Reply With Quote
Old 30th June 2009, 16:18   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
If HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations value exists then you can prompt the user to reboot first.

Stu
Afrow UK is offline   Reply With Quote
Old 2nd July 2009, 19:36   #3
wintergreen53
Junior Member
 
Join Date: Jun 2009
Posts: 2
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?
wintergreen53 is offline   Reply With Quote
Old 6th July 2009, 14:27   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 6th July 2009, 15:32   #5
thek
Member
 
thek's Avatar
 
Join Date: Jun 2006
Location: Austria
Posts: 92
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).
thek is offline   Reply With Quote
Old 6th July 2009, 16:25   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
But then you'd need to delete the registry value after the reboot (maybe another executable run via RunOnce).

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump