Jump to content

  • Log In with Google      Sign In   
  • Create Account

Eric Hobbs

Member Since 12 Jan 2011
Offline Last Active Mar 20 2014 02:43 AM

#5059918 Why is windows 7 deleting my files?

Posted by on 07 May 2013 - 12:35 AM

You do like MJP suggested and get the path to the Application Data directory via the appropriate API calls. Google searching "Delphi <FOLDERID>" where <FOLDERID> is the name of the constant that MJP pointed out might lead you down the correct path.

#5059532 Why is windows 7 deleting my files?

Posted by on 05 May 2013 - 12:57 PM

So, i have this program that save it's settings using a .bin file, it work normally under xp, but in windows 7, since i disabled uac it keep deleting it after each reboot, what's wrong??? And im running on an admin acount... do i have to give the file special permision or something?

Is it because the file is in program files (x86) folder?



It might be due to UAC Folder Virtualization.


see http://msdn.microsoft.com/en-us/gg465124


I really hate windows 7 over-security problem, it's just constantly get in the way of what you are trying to do... I guess ill have to use the registry, at least it wont delete my key (i hope...).



Its not overly secure and for most scenarios you want settings and other volatile data to be per user anyway so you shouldn't be writing to a global directory, like program files, anyway.