Archive: Advanced Uninstall Log - erasing depth


Advanced Uninstall Log - erasing depth
  Hi to All,

I have created a script and I have included the Advanced Uninstall Log NSIS Header.

In a section I have put this lines
SetOutPath "$INSTDIR\Builds\Architectures"
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
File /r /x .svn /x *.bak /x *.ncb /x *.suo $%MV_SDK%\Builds\Architectures\*
!insertmacro UNINSTALL.LOG_CLOSE_INSTALL


The content of $INSTDIR is C:\temp\MV_SDK\

Thus in the uninstall.dat file I have found this path as expected:

C:\temp\MV_SDK\Builds\Architectures\architectures_net2003 C:\temp\MV_SDK\Architectures\architectures_net2005
C:\temp\MV_SDK\Builds\Architectures\architectures_net2005\StdEditorArcDMTDLL.lib
C:\temp\MV_SDK\Builds\Architectures\architectures_net2003\StdEditorArcDMT.lib


I have set the UNATTENDED_UNINSTALL option.

Then I have launched the uninstall and the script deletes the two files .lib and the two directories.
Obviously the directories C:\temp\MV_SDK\Builds\Architectures\ and C:\temp\MV_SDK\Builds are not been deleted.
I would like to know if there is a workaround or a way to solve this glitch or it is necessary to modify the code (I hope not)

nsis version 2.45
Setup created on WIndows Vista Business and launched on Windows Xp SP2
Thanks in advance

Picoevera


Not quite sure what your asking but, if you are looking to remove the $INSTDIR then use:


# $INSTDIR is C:\temp\MV_SDK

>RMDir /r /REBOOTOK $INSTDIR
>

Thank you, Zinthose, for your answer.

But I have included the Advanced Uninstall Log NSIS Header in order to avoid the using of RMDir in recursively mode \r because I have read in the forum it is not safe.

picoevera


That's defiantly true. I once inadvertently removed my "C:\Windows\System32" with it while testing a package. (All praise virtual machines and snapshots!)

Anyway...

I'm not familiar with the "Advanced Uninstall Log" header so I'm unable to offer much insight in that regard.

However, From what little I see of the code provided it appears to be working as intended although I agree it appears that adding the ability to recursive check the parent directories for the lack of files and removing empty parent directories would be nice.

In the mean time the best solution is to RMDIR the "$INSTDIR\Builds\Architectures" & "$INSTDIR\Builds" folder manually while checking for files in those directories.