I have a little problem with my application. Application stores a SQLite database in C:\ProgramData\ProgramName\
folder on first run. I wanted to test if I delete the database, can application create a new database. On startup, I check if file exists using FileExists(filename)
function from SysUtils. But it returns always True, even if I deleted the ProgramName folder.
If I use another folder (for example %AppData%), then it's all OK.
What I'm missing here? Why FileExists function returns always True?
Microsoft warns against deleting them because these caches contain installer files for various applications on your computer that are useful for repairing, uninstalling, modifying, or reinstalling programs. If you delete the caches, Windows may not be able to carry out these modification operations.
Can I delete the folder C:\ProgramData\Package Cache\? Yes, you can delete that folder. Personally, I would recommend that you do not delete anything in the ProgramData folder, but you can absolutely delete anything you want.
To do this, start by opening the Start menu (Windows key), typing run, and hitting Enter. In the dialogue that appears, type cmd and hit Enter again. With the command prompt open, enter del /f filename, where filename is the name of the file or files (you can specify multiple files using commas) you want to delete.
One is simply using the delete option, and the other one is deleting files permanently. When you can't delete a file normally, you can delete undeletable files Windows 10 by selecting the target file or folder and then press Shift + Delete keys on the keyboard for a try.
Standard users (and that includes administrators when UAC is active) do not have delete rights to that location.
You need to find a different location to store the file if you need standard users to be able to delete it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With