Change scummvm.ini path?

Ask for help with ScummVM problems

Moderator: ScummVM Team

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3544
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

JohnnyWalker2001 wrote: Also, "echo %APPDIR%" literally outputs %APPDIR% in Vista...?
Maybe it can be found somewhere in the control panel? I'm no expert on Windows, and I've never even seen Windows Vista.

At least, I'm assuming that this screenshot of it is just a joke. :)
Reckless
Posts: 221
Joined: Tue Nov 01, 2005 1:12 am

Post by Reckless »

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.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3544
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

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...
Reckless
Posts: 221
Joined: Tue Nov 01, 2005 1:12 am

Post by Reckless »

All you ever [not] wanted to know about the sledgehammer Microsoft created to remove people's privileges...
http://crispybit.spaces.live.com/blog/c ... !134.entry

Why they couldn't go down the 'su' root of Unix instead of UAC and multiple layers of 'compatability' god only knows!
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Post by JohnnyWalker2001 »

? 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.

Try reading this: http://arstechnica.com/reviews/os/vista ... e-hood.ars

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 :(
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

That's strange indeed, as I am using Vista too and the ini file is written to the correct location :?
Kirben
Posts: 421
Joined: Wed Sep 21, 2005 12:15 pm
Location: Melbourne, Victoria, Australia

Post by Kirben »

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?
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Post by JohnnyWalker2001 »

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?
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3544
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

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.
User avatar
Praetorian
ScummVM Developer
Posts: 821
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Post by Praetorian »

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).
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Post by JohnnyWalker2001 »

Um, if it's not found, shouldn't it CREATE one?
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Post by JohnnyWalker2001 »

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.
User avatar
Praetorian
ScummVM Developer
Posts: 821
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Post by Praetorian »

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.
Post Reply