Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Pls help ..... Can we find out the modefied file during uninstall (http://forums.winamp.com/showthread.php?t=271885)

shruthi.j 28th May 2007 10:23

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

Afrow UK 28th May 2007 11:12

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

Stu

shruthi.j 28th May 2007 13:00

/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.........

Afrow UK 28th May 2007 14:24

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

shruthi.j 29th May 2007 09:11

Thanks,
shruthi


All times are GMT. The time now is 04:30.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.