Forums > MaxMSP

Where to best store app data on Windows

Oct 05 2013 | 4:23 am

For a standalone app I need to store some external data, so it’s not overwritten when the app is updated or replaced with a new version.

On OSX this is straightforward. I just write stuff to ~/Library/Application Support/Myapp. I am pretty safe to assume that I have permissions to create that directory and write things in it.

On Windows I’m not sure about this. I haven’t used the platform for ages but afaik there is "Program Files" but also possibly "Program Files x86_64" or something. And it is typically located on C:/ but it could be any other drive.

What would be a sensible approach? Are there any helper functions in Max or the SDK that can be used figure out a location on any Windows system that won’t get me into trouble?

Oct 05 2013 | 8:23 am

I found some standard W32 api. Makes sense to use that straight from my code. I wasn’t thinking clearly :)


Oct 05 2013 | 11:35 am

IMHO, on a multi-user machine CSIDL_APPDATA would probably be better.

Oct 09 2013 | 1:35 pm

Thanks for the advice Emmanuel. I’ll try that.

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > MaxMSP