INI files are in VirtualStore in Windows not ProgramData folder?

Since like 6 months ago I’m noticing my app, which should store some ini files etc into c:\programdata\myapp is now storing files into C:\Users\Bostjan\AppData\Local\VirtualStore\ProgramData\myapp

Any idea what happened that programdata is now also in virtualstore? I’m used to having this “issue” with program files but …

I’m running windows 11 22h2



That’s odd.

I would check the permissions on the ProgramData folder. If somehow your permission on that folder is not granted read/write, then I could see windows virtualizing the path.

The only other thought I’ve had is are you running your application with any compatibly settings?


1 Like

Hi Bostjan - That can happen if you don’t have a windows aware manifest and you try to write to a protected folder.


Thank you both for info where to look.

This had to be checked:

now I’m back where I should be :slight_smile:



Make sure you test what happens after your app initially creates a file in the subfolder you have created under “SV:CSIDL_LOCAL_APPDATA”. It seems to me I found I could place an initial file there, but when I needed to update the file (while the same user that created the file was signed into windows), I could not do so. I believe this was a problem I ran into under both Clarion code and SetupBuilder code. I think that under SetupBuilder I had to call a Windows API function to change the permissions of the file after it was initially created. Under Clarion, I gave up using “SV:CSIDL_LOCAL_APPDATA”, and just created subfolders underneath my application’s installation folder, which I could do because my app does not install to “CSIDL_PROGRAM_FILES” or “CSIDL_PROGRAM_FILESX86”

IIRC a SetupBuilder made Setup.exe will be recognized by Widows as an Installer and run with elevated permissions. That will allow it to do many things a Standard User cannot.

IIRC AppData / Program Data does have Special Permissions that prevent a Standard User from using it. I think the Installer is supposed to setup a specific subfolder (e.g. AppData\RichProgramData) for the program and change permissions so all users can Read/Write that subfolder.

Suggestion you search for AppData Permissions for more info. There is a command line tool CACLS or ICACLS that will show permissions.