Search code examples
filesystemsinstallationnsis

How to protect file from deletion using nsis?


I want to lock a file to prevent it from deletion during installation process, but I need to read this file at the same time. How can I do it using NSIS?


Solution

  • FileOpen $0 "$instdir\myfile.txt" r should block the deletion and allow you to read from it...