Skip to content
⌘ NSIS Forum Archive

Advanced Uninstall Log NSIS header

42 posts

isawen#
Re: Uninstaller details

Originally posted by isawen
Hi guys,

I am encountering the following issue. The Uninstaller details list is empty when executing the uninstaller. I have set ShowUninstDetails show but the list only displays the shortcut and installation folder deletion.

Is there any reason for this behavior?
I'm missing something maybe?

Best regards,
Isawen
I've figured out the solution and you could see it at the following address: http://forums.winamp.com/showthread.php?postid=2625204#post2625204

Hope this will be usefull for somebody.
dorakey#
Originally Posted by HaMsTeYr View Post
It IS really an excellent header, and same with jr_spurs, i as well am having problems with the speed of uninstalling...

You're having difficulty with 50 mb? i have a 4gb++ installation to handle xD

The uninstaller has been running for close to 2 hours now, and its still nowhere near done hahaha

It would be nice if something could be done to speed this up...
Yes .. the uninstall log is great but extremely slow when uninstalling large numbers of files. Have any way to speed it up? 🙂
HaMsTeYr#
Originally Posted by dorakey View Post
Yes .. the uninstall log is great but extremely slow when uninstalling large numbers of files. Have any way to speed it up? 🙂
On that note, and since this is an old thread, yes, yes i do have a way to speed it up. I actually went in and rewrote the code into something a lot simpler, and so far i've not encountered any major problems with it.

Its just a makeshift rewriting though, but if you're interested in it i can upload it.
dorakey#
Originally Posted by HaMsTeYr View Post
On that note, and since this is an old thread, yes, yes i do have a way to speed it up. I actually went in and rewrote the code into something a lot simpler, and so far i've not encountered any major problems with it.

Its just a makeshift rewriting though, but if you're interested in it i can upload it.
Yes, please do upload it, thanks ! 👍
HaMsTeYr#
Here it is, to use it:
Add
!include AdvUninstLog2.nsh

and since its a very makeshift modification, you can only use these macros

!insertmacro UNATTENDED_UNINSTALL

Section ""
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
File "SomeFile"
!insertmacro UNINSTALL.LOG_CLOSE_INSTALL
SectionEnd

Function .onInit
!insertmacro UNINSTALL.LOG_PREPARE_INSTALL
FunctionEnd

Function .onInstSuccess
!insertmacro UNINSTALL.LOG_UPDATE_INSTALL
FunctionEnd

Section "Uninstall"
!insertmacro UNINSTALL.NEW_UNINSTALL "$OUTDIR"
SectionEnd

For the uninstall section, i don't think the OUTDIR should matter much as i've coded it such that it looks for the whole directory from the root drive.

Anyway, those are the ones i'm using at the moment and they work well for me. Give them a shot 🙂
dorakey#
Originally Posted by HaMsTeYr View Post
Here it is, to use it:
Add
!include AdvUninstLog2.nsh

and since its a very makeshift modification, you can only use these macros

!insertmacro UNATTENDED_UNINSTALL

Section ""
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
File "SomeFile"
!insertmacro UNINSTALL.LOG_CLOSE_INSTALL
SectionEnd

Function .onInit
!insertmacro UNINSTALL.LOG_PREPARE_INSTALL
FunctionEnd

Function .onInstSuccess
!insertmacro UNINSTALL.LOG_UPDATE_INSTALL
FunctionEnd

Section "Uninstall"
!insertmacro UNINSTALL.NEW_UNINSTALL "$OUTDIR"
SectionEnd

For the uninstall section, i don't think the OUTDIR should matter much as i've coded it such that it looks for the whole directory from the root drive.

Anyway, those are the ones i'm using at the moment and they work well for me. Give them a shot 🙂
I have tried it and the uninstall speed is normal now, thanks a lot! 🙂

👍👍👍
HaMsTeYr#
No problem at all. It was bugging me as well, a damn good plugin limited by its uninstall speed. At any rate i'm glad it helped.
moatra#
Hamster, your changes were amazing for speed. I had a couple of problems with the original PRODUCT_UNINST_ROOT and PRODUCT_UNINST_KEY being replaced with INST_DIR_REG_ROOT and INSTDIR_REG_KEY, so I reverted that. I also updated the script so that it pays attention to the name defined inside the UNINSTALL_LOG var. I also noticed that it had problems removing folder outside of the base install directory (Such as those added to My Documents $DOCUMENTS), so I improved the uninstall loop to track any directories encountered. Since the default $INSTDIR sometimes is not recorded in the log, you may need to do a manual
push $INSTDIR
Call un.RemoveEmptyDirs
in your uninstall section
Denteroth#
Originally Posted by HaMsTeYr View Post
Here it is, to use it:
Add
!include AdvUninstLog2.nsh

and since its a very makeshift modification, you can only use these macros

!insertmacro UNATTENDED_UNINSTALL

Section ""
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
File "SomeFile"
!insertmacro UNINSTALL.LOG_CLOSE_INSTALL
SectionEnd

Function .onInit
!insertmacro UNINSTALL.LOG_PREPARE_INSTALL
FunctionEnd

Function .onInstSuccess
!insertmacro UNINSTALL.LOG_UPDATE_INSTALL
FunctionEnd

Section "Uninstall"
!insertmacro UNINSTALL.NEW_UNINSTALL "$OUTDIR"
SectionEnd

For the uninstall section, i don't think the OUTDIR should matter much as i've coded it such that it looks for the whole directory from the root drive.

Anyway, those are the ones i'm using at the moment and they work well for me. Give them a shot 🙂
I've noticed that most elements of the interactivity have been removed from your script... as well as any verification for the files having been changed.

Any plans to implement more in regards to those aspects? (Final install directory will not be removed if unlisted files are present. 🙁 )
HaMsTeYr#
I removed a lot of elements, to keep it simple and fast. I hated the fact that it would take forever just for the installer to search for existing files back and forth, so I chopped it down to a few simple commands.

TBH though, I made those changed for my purposes, but they're not too difficult to modify. You could try making these modifications yourself, and see how you go, or if you detail it just a little bit more, maybe I'll help :P maybe. xD
toe_head2001#
Advanced Uninstall Log seems to have an issue with NSIS v3. Specifically, the UNINSTALL.LOG_CLOSE_INSTALL macro.


NSIS Output reads:
!insertmacro: UNINSTALL.LOG_CLOSE_INSTALL
!undef expects 1 parameters, got 2.
Usage: !undef symbol
Error in macro UNINSTALL.LOG_CLOSE_INSTALL on macroline 9

It's referencing this line of code in the header file:
   !undef ID ${__LINE__}
I believe it should just be:
   !undef ID

Correct?
I'm not sure if the syntax in NSIS changed in v3, or if it just became more verbose with errors.
Anders#
Originally Posted by toe_head2001 View Post
Correct?
Yes

Originally Posted by toe_head2001 View Post
I'm not sure if the syntax in NSIS changed in v3, or if it just became more verbose with errors.

v3.0 is stricter in some places but it surprises me that v2.4x would accept that.