Archive: Pls help ..... Can we find out the modefied file during uninstall


Pls help ..... Can we find out the modefied file during uninstall
Hi,
I have a doubt can we find out the file been modified by user during uninstallation and stop the uninstaller from deleting that files.

thanks,
shruthi


Surely if the user has a file open then it will be locked and will not be deletable. Just don't use /REBOOTOK.

Stu


/REBOOTOK is not used but steel the file been modified by the user is getting deleted.

Section "Uninstall"

Call un.DeleteEnvStr
; Remove files and uninstaller
Delete $INSTDIR\uninstall.exe
RMDIR /r "$INSTDIR\*.*"
RMDIR /r "$INSTDIR\*"

SectionEnd

The above code will delete even the modified files and the files not installed by the installer also.

Can u help with alternative code, pls.........


You should not use RMDir /r $INSTDIR. What if the user installs to C:\? The operating system and everything else will be deleted.

You must only uninstall what files were installed, either by using individual Delete instructions, or one of the following:
http://nsis.sourceforge.net/Advanced...og_NSIS_Header
http://nsis.sourceforge.net/Uninstal...nstalled_files

Only the first of these two allows you to use File /r.
Neither of them however allow you to only delete files that have not been modified by the user.

Stu


Thanks,
shruthi