Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 28th May 2007, 10:23   #1
shruthi.j
Junior Member
 
Join Date: May 2007
Location: bangalore
Posts: 7
Send a message via Yahoo to shruthi.j
Question 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
shruthi.j is offline   Reply With Quote
Old 28th May 2007, 11:12   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Surely if the user has a file open then it will be locked and will not be deletable. Just don't use /REBOOTOK.

Stu
Afrow UK is offline   Reply With Quote
Old 28th May 2007, 13:00   #3
shruthi.j
Junior Member
 
Join Date: May 2007
Location: bangalore
Posts: 7
Send a message via Yahoo to shruthi.j
/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.........
shruthi.j is offline   Reply With Quote
Old 28th May 2007, 14:24   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 29th May 2007, 09:11   #5
shruthi.j
Junior Member
 
Join Date: May 2007
Location: bangalore
Posts: 7
Send a message via Yahoo to shruthi.j
Thanks,
shruthi
shruthi.j 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