Reading/writing to the game's directory on Vista/7 ?

Started by Monsieur OUXX, Fri 14/02/2014 13:35:19

Previous topic - Next topic

Monsieur OUXX

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?
 

Crimson Wizard

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.

Monsieur OUXX

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?
 

Crimson Wizard

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.

DoorKnobHandle

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.

Monsieur OUXX

cool.
Thanks very much for your answers, you guys.
 

SMF spam blocked by CleanTalk