![]() |
#1 | ||
Junior Member
Join Date: Aug 2006
Location: Sweden
Posts: 9
|
Uninstall only installed files
Hello!
Im new to NSIS but i have made som installers. But now im trying to make so only the installed files gets uninstalled. I found this But then my uninstallers uninstalls I stops then i trys to delete the folder. For example: then the uninstaller trys to uninstall INSTDIR\direxample the uninstallers stop and does nothing. whats wrong with the code? If I skip to install that section that dosent work an other one makes it stop ![]() Here is the code for one section that dont work: Quote:
and this is how the uninstall sections looks like: Quote:
EDIT: Now I have another problem to. I have 4 things that can be installed with the installer. But I cant uninstall if the first of them is installed. Its says that it cant find the uninstal log. Again see the attached code. EDIT Agian: Now I saw that then the uninstallers just stop The folder that it trys to remove is removed. Only 2 files is left and that is the uninstaller and the log that the uninstaller uses, How can I fix this? // Sorry for my bad english I hope you understand Last edited by Baafen; 23rd August 2006 at 15:19. |
||
![]() |
![]() |
![]() |
#2 | |
Junior Member
Join Date: Aug 2006
Location: Sweden
Posts: 9
|
Sorry for dubble post but I cant edit anymore..
Well I have only one thing left. The uninstaller dosent delete the uninstall.log thats why my uninstaller freeze. This part is that will delete the uninstall.log but i dont Quote:
|
|
![]() |
![]() |
![]() |
#3 |
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
It's a bit odd, but here's a couple things you might look at:
1. $INSTDIR during uninstall is the directory in which the Uninstaller is located, which means that it's NOT necessarily what $INSTIDR was set to during the install. So it could be that you are not even in the right directory (or at least not in the directory you think you are.) 2. The uninstaller by default copies itself to the TEMP folder and runs from there, which would also mean that $INSTDIR could be pointed to your temp directory and not where you intended. My recommendation would be that during install, you write $INSTDIR either to the registry or save it to a known file location. Then, during uninstall read the value back to you know exactly where to look. You can also specify $INSTDIR during uninstall by using the _? switch. Refer to the section 3.2.2 of the help files for more info. |
![]() |
![]() |
![]() |
#4 | ||
Junior Member
Join Date: Aug 2006
Location: Sweden
Posts: 9
|
Quote:
Quote:
work? I think I know what the problem is now. I think the prolem is that uninstall.log is still in use. Then I try to delete it my computer says that uninstall.log is in use. So FileClose $UninstLog dosent do what i should do.. I hope someone can answear how to solve this. Last edited by Baafen; 23rd August 2006 at 19:48. |
||
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|