3

I'm having weird situation where i "see" diffrent versions of the same file when running program as administrator and when running it as non-privileged user.

The file is sqlite's db3 file which located on a folder inside "program files (x86)".

When running the program "sqlitestudio" with administrative rights and then opening the file inside the program i see some values that are diffrent from when i'm running the program without administrative rights!
This is really weird, because that the values that i see when running in non-privileged mode are legitimate, and was written in older version of the file.

Does anyone know what the @!# causes this?

Thanks in advance, Eitan

Eitan
  • 33
  • 2
  • 1
    Are you sure the files are actually being stored in `Program files`? Programs are not supposed to store any data in that location. Program Files is supposed to be read-only from a non-admin users perspective. – Zoredache Nov 21 '12 at 20:37
  • @Zoredache - yes i'm sure, it's a file of program that i'm currently developing (it was installed and i want to debug it using the installed files) – Eitan Nov 21 '12 at 21:10
  • Fix your application to not write data in Program files then? – Zoredache Nov 21 '12 at 21:20
  • @Zoredache - No, it's OK. I have manifest file for the program that defines that admin rights are required to run, so the user won't have the problem that i had. See mihi's answer below.. – Eitan Nov 21 '12 at 21:23

1 Answers1

3

Look in AppData\Local\VirtualStore inside the profile of the user that has run the program.

Apparently it was launched in compatibility mode by the actions it performed (like writing to program files) and then Folder Virtualization kicks in and moves all written files to your user profile.

When running as Administrator, compatibility settings will not be used, so you see the files that are really on disk.

Note that this folder may be hidden, so either type it in completely or enable showing hidden folders.

You can use the Compatibility Administrator to change settings manually (like redirect only some files, or redirect some files to C:\ProgramData which is writable for everyone and redirect the rest to the user profile as it contains settings for each user).

mihi
  • 890
  • 1
  • 7
  • 14
  • Your are my hero!! Iv'e never heard about this feature before and i think it would take me very long time to find this without you! thanks so much! – Eitan Nov 21 '12 at 21:11
  • heh, you are welcome. and when testing your own unfinished stuff, just do not install into Program Files but into some directory you created before where your user has full permissions. :D (in case what your tool does is not an administrative task, maybe you are better of storing your database in ProgramData or somewhere in the user profile though.) – mihi Nov 22 '12 at 18:29