Old 7th March 2004, 11:48   #1
coolice
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
coolice is offline   Reply With Quote
Old 7th March 2004, 12:09   #2
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
So what is the result? A folder with a DLL or an empty folder?
Joost Verburg is offline   Reply With Quote
Old 7th March 2004, 12:12   #3
coolice
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
coolice is offline   Reply With Quote
Old 7th March 2004, 12:17   #4
Joost Verburg
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?
Joost Verburg is offline   Reply With Quote
Old 7th March 2004, 12:21   #5
coolice
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..
coolice is offline   Reply With Quote
Old 7th March 2004, 12:38   #6
Joost Verburg
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?
Joost Verburg is offline   Reply With Quote
Old 7th March 2004, 12:40   #7
coolice
Junior Member
 
Join Date: Mar 2004
Posts: 7
No, it seems ony, if I delete it manually. I really dont understand it....
coolice is offline   Reply With Quote
Old 7th March 2004, 12:41   #8
Joost Verburg
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?
Joost Verburg is offline   Reply With Quote
Old 7th March 2004, 12:44   #9
coolice
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...
coolice is offline   Reply With Quote
Old 7th March 2004, 13:12   #10
Cecilio
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
Cecilio is offline   Reply With Quote
Old 7th March 2004, 14:50   #11
coolice
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 ?
coolice is offline   Reply With Quote
Old 7th March 2004, 16:26   #12
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Try using SendMessage instead of that PostMessage call.
Joost Verburg is offline   Reply With Quote
Old 7th March 2004, 16:32   #13
coolice
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
coolice is offline   Reply With Quote
Old 7th March 2004, 18:11   #14
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
SendMessage $0 16
Joost Verburg 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