Writing json files in Vista and Windows7

Jul 12, 2011 at 4:28pm

Writing json files in Vista and Windows7

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

#57826
Jul 12, 2011 at 5:20pm

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.

#207467
Jul 12, 2011 at 6:04pm

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?

#207468

You must be logged in to reply to this topic.