Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Monsieur OUXX on Fri 14/02/2014 13:35:19

Title: Reading/writing to the game's directory on Vista/7 ?
Post by: Monsieur OUXX on Fri 14/02/2014 13:35:19
hi everyone,

The more my scripting progresses, the more modules I have that read and write custom files present in the game's directory. I'm using Windows XP.

But I also know that there are restrictions with Windows Vista/7, and that there are features like $MYDOCS$ or $SAVEGAMEDIR$ to circumvent that.

Did anyone have issues writing extra files to the game's directory?
Does anyone have best practices to recommend?
Title: Re: Reading/writing to the game's directory on Vista/7 ?
Post by: Crimson Wizard on Fri 14/02/2014 13:39:26
Quote from: Monsieur OUXX on Fri 14/02/2014 13:35:19

Did anyone have issues writing extra files to the game's directory?
Does anyone have best practices to recommend?
They will fail if game is installed on system disk (usually C) unless game is run with administrator rights.
Title: Re: Reading/writing to the game's directory on Vista/7 ?
Post by: Monsieur OUXX on Fri 14/02/2014 15:13:42
Quote from: Crimson Wizard on Fri 14/02/2014 13:39:26
They will fail if game is installed on system disk (usually C)
OK, but I suppose using $SAVEGAME$ allows me to write to "Documents\Saved games" or whatever -- so it should work?


Quote from: Crimson Wizard on Fri 14/02/2014 13:39:26
unless game is run with administrator rights.
Is that common practice, or is it totally unreasonable?
Title: Re: Reading/writing to the game's directory on Vista/7 ?
Post by: Crimson Wizard on Sat 15/02/2014 08:46:58
Hmm, I was mistaken, Win7 only prevents you to save files in certain folders (like C:/Program Files). Don't remember what Vista does.

Quote from: Monsieur OUXX on Fri 14/02/2014 15:13:42
OK, but I suppose using $SAVEGAME$ allows me to write to "Documents\Saved games" or whatever -- so it should work?
I think it should.

Quote from: Monsieur OUXX on Fri 14/02/2014 15:13:42
Quote from: Crimson Wizard on Fri 14/02/2014 13:39:26
unless game is run with administrator rights.
Is that common practice, or is it totally unreasonable?
I don't know what common practice is in general. It became a common practice for me to install all older games on disk D, and that usually solves any issues related to write access. Not every user is administrator on his computer, even if it's home computer, in theory.
Title: Re: Reading/writing to the game's directory on Vista/7 ?
Post by: DoorKnobHandle on Sat 15/02/2014 11:49:40
My last game The Art of Dying writes and reads a lot to its game directory, it's been downloaded ~2k times and I haven't gotten a single bug report about it so I'm pretty sure there are no issues on the vast majority of user systems.
Title: Re: Reading/writing to the game's directory on Vista/7 ?
Post by: Monsieur OUXX on Sat 15/02/2014 16:22:29
cool.
Thanks very much for your answers, you guys.