Deleting a file from C: / ProgramData on Windows 7 really doesn't delete the file?

I have a little problem with my application. The application saves the SQLite database in the folder C:\ProgramData\ProgramName\ upon first launch. I wanted to check if I delete the database, whether the application can create a new database. At startup, I check if the file exists using the FileExists(filename) function from SysUtils. But it always returns True, even if I deleted the ProgramName folder.

If I use another folder (for example,% AppData%), then everything is OK.

What am I missing here? Why does the FileExists function always return True?

+6
source share
1 answer

Standard users (and which include administrators with active UAC) are not allowed to delete this place.

You need to find another place to store the file, if you need it so that standard users can delete it.

+2
source

Source: https://habr.com/ru/post/892985/


All Articles