Archive: Un-installer: Possible to delete *.* but leave ONE file?


Un-installer: Possible to delete *.* but leave ONE file?
I am trying to leave one file when un-installing the "install" line looks like:
file "p:\micad\*.mdb"

^^ this line adds alot of mdb files, typing out each one manually would waste alot of time

I need to leave one particular .mdb file

I tried SETFILEATTRIBUTES readonly

but the uninstaller still wipes the file.
any help?

Thanks.
-chris


You can find the files one by one using FindFirst, FindNext and FindClose. If the file's name isn't the one you want to keep, delete it.


I know what the files name is, but is there an EXCLUDE option for keeping one file whilst deleting all others?


You can do it with the Delete instruction alone. Use the method I have described above.


you can also try moving the file to your temp directory, deleting everything and then putting it back.

Just an idea?


I'm creating a program to do something very similar for the installer. You can read details on it here.

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

I'll look into writing an equivalent uninstaller version as well.


possibly a quicker way would be to open the file in question and then delete the contents of the directory then close the file in question.

Haven't tried this myself though.