Old 24th August 2006, 08:19   #1
Baafen
Junior Member
 
Join Date: Aug 2006
Location: Sweden
Posts: 9
Frustrating problem with uninstaller

Im trying to make so only the installed files gets uninstalled.CODE
But something makes the uninstaller freeze then only one file is left. The uninstall.log.

Here is a image that shows were the uninstallers stops/freeze.
Its show that its trying to remove fgd/counter-strike but that folder is removed. The only file left is uninstall.log.

And here are a image of the only file left. (in the red circle). Files with a balck line over are not going to be uninstalled.
I took this screen after I had stoped the uninstaller by CTRL+ALT+DEL.

I have two ideas why it doesent work but I dont know how to solve it.

1. The uninstall.log is in use by the uninstaller so it cant delete it

2. The code for the uninstaller just loop and loop and never stops.

And I dont think it has something to do with that the uninstaller copy its self to temp. And the installdir sems to be right.

So what can be wrong with the code?

I have attached the nsi so you can take a look at it.

// Sorry for my bad english
Attached Files
File Type: nsi installer_baafen.nsi (10.1 KB, 264 views)
Baafen is offline   Reply With Quote
Old 25th August 2006, 04:04   #2
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
Just looking at your code, I think you are getting into an endless loop at the very end just before you delete the log file.

Just swap the last 2 lines so that this:
code:
StrCmp $R1 0 LoopDone
IntOp $R1 $R1 - 1


becomes this:
code:
IntOp $R1 $R1 - 1
StrCmp $R1 0 LoopDone

.

The original problem happens when $R1 gets assinged a value of zero and then starts the loop again. When $R1 is zero, $R2 will never be able to equal $R1 and therefore you get into an endless loop. By checking the value of $R1 AFTER you change it's value, you can exit the loop at the proper time.
Comperio is offline   Reply With Quote
Old 25th August 2006, 07:20   #3
Baafen
Junior Member
 
Join Date: Aug 2006
Location: Sweden
Posts: 9
Thanks but just before I was going to bed I got it to work.
So the problem is solved
Baafen 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