APPDATA is an environment variable that will point to: C:\Users\'Username'\AppData\Roaming
LOCALAPPDATA is an environment variable that will point to: C:\Users\'Username'\AppData\Local
The use of either will depend on whether it's meaningful to support roaming profiles... probably not for a game as roaming profiles are unlikely to be used at home.
Reckless wrote:APPDATA is an environment variable that will point to: C:\Users\'Username'\AppData\Roaming
Except JohnnyWalker2001 said on his Windows Vista installation, it wrote scummvm.ini to C:\Users\Johnny\AppData\Local\VirtualStore\Windows so I guess it depends on something or the other...
? It's hardly a sledgehammer. Virtualization means that all those naughty programs that liked writing to the Program Files and Windows directories can still work, while maintaining system security and stability.
JohnnyWalker2001 wrote:
Anyhoo, it's a little worrying that "OXO" attempted to write to C:\WINDOWS\ in a new installation of it under Vista... No idea why it did it
It sounds like you used a previous version of ScummVM on your system.
The 'scummvm.ini' file in the Windows directory, will be used, if it already exists. So does a 'scummvm.ini' file, exist in your Windows directory?
I did have a previous version of ScummVM on my system, left over from a previous installation of XP (on a completely different physical drive).
When I loaded up OXO, I needed to re-create all of the game paths... ie. there was no existing configuration appeared to be found.
To answer your final question, as I've already said, it's impossible for Vista to have a ScummVM.ini in the Windows directory unless I put it there (and even then, would it be really be there?). It was in the Windows virtualization folder which I found it, though.
Could have running a previous version of ScummVM (with it's own .ini file) then have made the new installation (again on a completely different, third harddrive) not read this file but also create a new .ini file on the Windows dir? Is that possible?
Considering the complexity of my situation, maybe it would be best to listen out for anyone else saying the same thing?
JohnnyWalker2001 wrote:
Could have running a previous version of ScummVM (with it's own .ini file) then have made the new installation (again on a completely different, third harddrive) not read this file but also create a new .ini file on the Windows dir? Is that possible?
I'm not sure I understand the question, but the old behaviour (0.9.x and earlier, I believe) was for the Windows version of ScummVM to put scummvm.ini in the Windows folder. It still looks there for backwards compatibility, and will then probably keep using that file. But if it isn't there, it should use APPDIR. I think.
Just an update as to what I eventually did in my NSIS setup script, for a patch to scummvm games that should locate and update the scummvm.ini file.
I check for the windows OS version and:
1. For windows 9x and me, the first location checked is the $WINDIR folder. (the $WINDIR is a NSIS variable that stores the windows installation directory)
2. For windows 2000, XP and Vista , the first location checked is the $APPDIR/ScummVM/ folder. (The $APPDIR in NSIS seems to store the proper path for each of these O.S. to find the scummvm.ini in 0.X.0 -according to the paths mentioned in the ReadMe.txt file of ScummVM). If the file scummvm.ini is not there, then the $WINDIR location is checked.
If steps 1 or 2 produce no path, then it is assumed that the user is using a custom scummvm.ini file, in which case s/he should enter the path himself/herself manually (by browsing the hdd folders).
eriktorbjorn wrote:I'm not sure I understand the question, but the old behaviour (0.9.x and earlier, I believe) was for the Windows version of ScummVM to put scummvm.ini in the Windows folder. It still looks there for backwards compatibility, and will then probably keep using that file. But if it isn't there, it should use APPDIR. I think.
Well it didn't find one anywhere (because it didn't list any games when I first loaded it up). And when I looked for it, I found it in the Windows dir (or the Vista equivalent of).
I might try again (moving my current .ini to somewhere else) and see where it wants to create it.
JohnnyWalker2001 wrote:Um, if it's not found, shouldn't it CREATE one?
For ScumnmVM this is a Yes. It's ScummVm's job to create the scummvm.ini. Which I am quite certain it does, at the first launch of scummvm, if no scummvm.ini is found in the default locations.
For my setup programm this is a No. If a 3rd party app that wants to update ScummVm.ini does not find it in the default paths, then it should ask the user to provide it, and not create a file that will possibly override a custom one. It is also out of scope. Still, there could be a friendly warning that ScummVm should be launched at least once for the scummvm.ini file to be created, before running my patch setup executable.