Archive: Delete all files and folder on uninstalling


Delete all files and folder on uninstalling
Hi

I've another problem: I realized a script with uninstaller .... the problem is that when I execute the uninstaller it removes only the files copied during the setup procedure, but in that directory there are also others files created by the program I realized.

How to set the uninstaller to remove ALL files and the entire directory?

Thanks:)


Delete "$INSTDIR\file1"
Delete "$INSTDIR\file2"
Delete "$INSTDIR\uninst.exe"
RmDir /r "$INSTDIR"


Consider the potential danger when using RmDir with the /r switch. It's been reported several times that the entire Program Files directory has been removed because of incorrect usage.
Here's a recent thread about,

http://forums.winamp.com/showthread....hreadid=289986


Well I solved the problem using

Delete "$INSTDIR\*.*"
RmDir /r "$INSTDIR"

There is any problem using this script?