Question How do I check for a file and delete it, if found?
Use a Wisescript custom action to either search for a file or use Check if File/Dir exists, then delete file. Use a Set Variable custom action for the path to the file that should be searched for and also in the Delete File action.
Check if File/Dir exist then Delete File End Statement.
Set Variable TEST to C:\TEST
If File or Directory exists %TEST%\File.txt
Delete File(s) %TEST%\File.txt
The Check if File/Directory exists action gives you the ability to Display a message only, Start an While loop or Start Block as shown above or abort the installation.
This is machine translated content
Login to Subscribe
Please login to set up your subscription.
Didn't find the article you were looking for? Try these resources.