|
|
#1 |
|
Junior Member
Join Date: Mar 2004
Posts: 7
|
delete problem, please help.
Hi !
I am in a great trouble as I can not fix a last issue with my installer for a month now, and this is my last hope. Fact details : - I am using NSIS 2.0 - I had created nsis script for a ToolBar aI had created. - Everything is perfect, except that in case Uninstall, the installation directory not deleted, most probably because of the unregistered DLL. - Because of the toolbar speciality, I have to remove all files instant, no reboot or mark for reboot is possible. - I tested the dll, and it is perfectly possible to delete manually, so I am suer I am doing something wrong in my script. - What am I doing : search and close all IE instances, unregister the dll, and delete the hole folder. - I pleaced enough Sleeps as well at least I believe. Here it is : ;----------------------------------------------- Section "Uninstall" SetAutoClose false SetOutPath $INSTDIR SetDetailsView show loop: FindWindow $0 "IEFrame" IntCmp $0 0 done IsWindow $0 0 done System::Call 'user32::PostMessageA(i,i,i,i) i($0,16,0,0)' Sleep 200 Goto loop done: Sleep 2000 UnRegDLL "$INSTDIR\toolbar.dll" Sleep 2000 RMDir /r "$INSTDIR" Sleep 2000 DeleteRegKey HKCU Software\Toolbar6 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyToolbar Exec '"$PROGRAMFILES\Internet Explorer\IEXPLORE.EXE" "http://www.sample.com"' Sleep 2000 BringToFront SectionEnd ; ;----------------------------------------------- Can You help me please ? Big thank you in advance, Moore |
|
|
|
|
|
#2 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
So what is the result? A folder with a DLL or an empty folder?
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2004
Posts: 7
|
The result is, that directory stays with vary number of files.
toolbar.dll stays, and everything under as well, and if there is any subdir, it stays as well. Hoever, my target is to remove the hole dir with everything in it. Thats why I am using RMDir /r. BIG THANKS FOR YOUR EFFORT, I am really lost... Moore |
|
|
|
|
|
#4 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
Then the file is still in use by Internet Explorer or the Windows Explorer. Maybe a reboot is required, why is this such a problem?
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Mar 2004
Posts: 7
|
No, the file not used at least I can delete it with File Explorer easily.
This toolbar is used on high central servers, therefore they can NOT be removed or logged off easily. But back to the problem : - If I can delete it manually, but NSIS cant. What can be the different ? I think nothing more than time. So is there anyway, I can wait until the file would be deleted ? As giving higher value for Sleep is not the visest idea.. |
|
|
|
|
|
#6 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
Using sleep is never a good idea. But does it work if you wait a little longer?
|
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Mar 2004
Posts: 7
|
No, it seems ony, if I delete it manually. I really dont understand it....
|
|
|
|
|
|
#8 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
Are you sure all browsers are closed? Can you even remove the whole folder at once in Windows Explorer?
|
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Mar 2004
Posts: 7
|
Yes, I can remove the complete folder as well. And yes, I am sure that all IE closed. Very strange. But I have to solve it somehow...
|
|
|
|
|
|
#10 |
|
Junior Member
Join Date: Mar 2004
Location: Spain
Posts: 8
|
I have no idea but try to do:
Delete "$INSTDIR\toolbar.dll" to find if it possible to delete the dll from the uninstaller |
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Mar 2004
Posts: 7
|
I have a new info.
If I close IE windows manually, the hole uninstall process working OK, the directory instantly removed ! So it seems the IE clos routine part visible closing IE windows but not practically. However tas manager dont show them... Any idea ? |
|
|
|
|
|
#12 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
Try using SendMessage instead of that PostMessage call.
|
|
|
|
|
|
#13 |
|
Junior Member
Join Date: Mar 2004
Posts: 7
|
Can you correct that part of my code please ? As when I simply rewritten it to SendMessage it did not compiled.
THANKS A LOT, Moore |
|
|
|
|
|
#14 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
SendMessage $0 16
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|