Forums > MaxMSP

Writing json files in Vista and Windows7

Jul 12 2011 | 4:28 pm

I’ve got a Windows standalone app that reads and writes it’s own preset files as json files. My problem occurs when the user puts the app in the "Program Files" directory on either Vista or Windows 7 (it works perfectly in XP). What happens is that the app will read the json files if they already exist, but won’t write to them. If they put the app somewhere other than in the "Program Files" directory, even at the same directory level, everything works fine. I’m much more of a Mac guy, so my question is for the Windows gurus. Is there some sort of permission issue with the "Program Files" directory that I need to deal with? Any hints or suggestions? Thanks so much!

The path to the preset file looks something like: C:/Program Files/AppDirectory/presets/presets.json

Jul 12 2011 | 5:20 pm

I think Win7 and Vista are picky about where applications can write data.

I think it prefers you save your data in your application
directory. Which is located in c:windowsuseradataappdata (something like that).

Also, always test these things logged in as administrator. If you do
not, you really don’t know what kind of restrictions there may be.

Jul 12 2011 | 6:04 pm

Thanks, Anthony! I was afraid it was going to be something like that. Do you happen to know if there is a way in Max to get the path to the appdata directory?

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

Forums > MaxMSP