0
votes

I have been trying to add in an Uninstall only installed files function into my NSIS installer using the Uninstall only installed files tutorial that can be found here

The example works fine when I only add files to the installer that are in the same directory as the .nsi source file. For example adding a file using this command:

${File} "file.txt"

The file file.txt is installed and can also deleted when you run the uninstaller. However if I place file.txt into a subdirectory called Files and use the command:

 ${File} "Files\file.txt"

The file.txt file will be installed correctly, but when I run the uninstaller it wont be deleted.

Am I missing something obvious with NSIS here?

1

1 Answers

0
votes

May be one of the following two reasons:-

  1. In your $InstDir Files\File.txt is just included like $InstDir\File.txt whereas Uninstaller is trying to Delete $InstDir\Files\File.txt.

  2. In your $InstDir Files\File.txt is included like $InstDir\Files\File.txt But your Uninstaller is trying to Delete $InstDir\File.txt.