Location of scummvm.ini

Ask for help with ScummVM problems

Moderator: ScummVM Team

User avatar
Dark-Star
Posts: 150
Joined: Sun Oct 30, 2005 9:36 pm
Location: Reutlingen, GERMANY

Location of scummvm.ini

Post by Dark-Star »

The recent flurry of posts about problems with the scummvm.ini file in c:\windows made me wonder: Why is it put there by default anyway? Actually, no application data should be put there anymore since win95. I think it would be better to use either the "Application Data" directory, or, even better, the ScummVM directory itself by default.

I could come up with a patch to do just this if you beat me to it..

Opinions?

--Darkstar
joachimeberhard
ScummVM Team Member
Posts: 377
Joined: Sat Sep 24, 2005 12:25 pm
Location: Austria

Post by joachimeberhard »

I just copy paste my thoughts expressed in a different thread here for completion:
What is even WORSE is that ScummVM requires Users to have full-access rights to the Windows directory.

I would have thought that Open-Source developers, who mostly use *nix derivats like Linux, BSD and MacOS X would know of the risks of doing so......

This is going to become an even bigger problem when Vista finally arises.

Do we have to enter the root-password then everytime we start ScummVM???
True, however you still require users to have permission to write either to C:\Windows or C:\Windows\ScummVM.ini respectively.

Now which way do you think a non-technical user is going to go?

Either work as an Admin, which is a bad idea.
Or give himself full writing rights to the Windows directory.

I don't think that users add scummvm.ini as Admin, give permissions to write on this particular file only and then re-log-in as restricted users....
User avatar
Dark-Star
Posts: 150
Joined: Sun Oct 30, 2005 9:36 pm
Location: Reutlingen, GERMANY

Post by Dark-Star »

OK I dug around in the MSDN a bit and it seems that, to use the "Application Data" directory (via SHGetFolderPath()), ScummVM's requirements would go up:
Minimum operating systems: Windows 95 with Internet Explorer 5.0, Windows 98 with Internet Explorer 5.0, Windows 98 Second Edition (SE), Windows NT 4.0 with Internet Explorer 5.0, Windows NT 4.0 with Service Pack 4 (SP4)
However, I'm not sure how many of ScummVM's users don't have Internet Explorer 5 installed...
ScummVM would have to be linked against SHELL32.DLL.

I'll try to come up with a patch which I'll submit to the tracker once it's ready.

The other option would be to use something like GetModuleFileNameEx() to query the path of ScummVM.exe and store the ini-file there, however I'm not yet convinced that there's not a simpler method of finding the directory where the current process is located.

--Darkstar
clem
Posts: 2159
Joined: Mon Oct 31, 2005 11:14 am

Post by clem »

somebody once mentioned that you're not supposed to write to the application's directory either as an end-user
User avatar
LogicDeLuxe
Posts: 437
Joined: Thu Nov 10, 2005 9:54 pm

Post by LogicDeLuxe »

I think, ScummVM should check for the environment variable APPDATA. If it's present, it has the path to the user specific data files.
If APPDATA is not present, it's probably an old Windows version and ScummVM might still use the Windows directory in that case, since there is no access restriction anyways then.
I don't think that you would require a particular IE in order to do that. Imho, ScummVM really should run also on a system without any browser installed.
clem wrote:somebody once mentioned that you're not supposed to write to the application's directory either as an end-user
I guess, that's the reason there is the APPDATA, which points to a user specific directory.
In the unlikely case ScummVM is installed on a system with several user accounts, and the admin don't want you to make your own game list, but a comon one for all users, he simply can point the scummvm.ini to somewhere else with the -c command.
Besides, on other OSes, it defaults to a user specific directory as well, if there is one.
joachimeberhard
ScummVM Team Member
Posts: 377
Joined: Sat Sep 24, 2005 12:25 pm
Location: Austria

Post by joachimeberhard »

Well, I think IE4 is necessary for those %AppData% variables because it is necessary for the changes made by IE4 to the Windows Explorer.

An there were quite many changes.

So actually, LogicDeLuxes point is valid:
If APPDATA is not present, it's probably an old Windows version and ScummVM might still use the Windows directory in that case, since there is no access restriction anyways then.
User avatar
Kaminari
Posts: 275
Joined: Mon Oct 24, 2005 2:25 am
Location: Paris, France
Contact:

Post by Kaminari »

It's been discussed ad nauseam and rejected.

There's an easy workaround. Create a desktop shortcut pointing to your ScummVM executable, right-click on the shortcut, go to Properties and change the target path as follows:

Code: Select all

D:\Emulation\ScummVM\ScummVM.exe -cScummVM.ini
Problem solved.
User avatar
LogicDeLuxe
Posts: 437
Joined: Thu Nov 10, 2005 9:54 pm

Post by LogicDeLuxe »

Kaminari wrote:It's been discussed ad nauseam and rejected.
That one was about multiple places, not neccesarily about the problems involved with the current implementation. I agree on that we don't need multiple scummvm.ini. At least not for a single user. If he want's it anyways, there is the -c command.
The issue is it's problematic default location.
There's an easy workaround. Create a desktop shortcut pointing to your ScummVM executable, right-click on the shortcut, go to Properties and change the target path as follows:

Code: Select all

D:\Emulation\ScummVM\ScummVM.exe -cScummVM.ini
Problem solved.
Well, it's simple, but surely not the first think, a newbie would think of.
I'm also not that happy with the answer the FAQ has to offer on that matter. Maybe the user has no access to an admin account at all. It would be really a good idea, if one wouldn't need admin access for this. The rights to install a software to a user account should suffice, imho.

As this is a matter asked quite frequently, you should realize that this in fact causes much trouble. It would make the life of a newbie much easier. And it shouldn't that much work to change the default location anyways.
joachimeberhard
ScummVM Team Member
Posts: 377
Joined: Sat Sep 24, 2005 12:25 pm
Location: Austria

Post by joachimeberhard »

Yeah, because when you CAN install/copy ScummVM to a folder, you obviously have writing permissions there, so ScummVM should default it's ini there.

You see, I did not bring up this matter because I had problems with it.
I know what I'm doing.

It concerns me because the newbie user who just downloads the program and wants to get playing is forced to have admin rights.

Now, being an Admin myself, I just have to say that good software AND good written games DO NOT require you to have admin rights.

So I suggest ScummVM should not need Admin rights too, especially when it in fact does not need them for anything else than writing an ini file to the OS directory.

Best regards

Joachim
User avatar
Herrscher
Posts: 110
Joined: Sun Oct 30, 2005 5:17 pm

Post by Herrscher »

BTW: Even if ScummVM.ini for paths to the installed games is applied by the user who is installing (and therefore administrator) - common to all, the savegames belong to the currently logged in user, so they should be saved accordingly.

Look for GTA III for example: It stores savegames in %HOMEPATH%\My Files\GTA III Savegames (or whatever the correct english name is for that).

So when they reinstall Windows, the backup of "My Files" for all users (which anybody does for bookmarks and stuff anyways) will fetch the savegames, too.
joachimeberhard
ScummVM Team Member
Posts: 377
Joined: Sat Sep 24, 2005 12:25 pm
Location: Austria

Post by joachimeberhard »

I still would go with the ScummVM directory itself as the place to store the ini files by default.

Putting it into the Documents folder is not a bad idea, but still could lead to questions like "Where do I find it on my computer?", because it is possible to map the "Documents" to any path you like.

If you're on a ActiveDirectory domain for example, you most probably have the "Documents" redirected to the server anyway.

On the other hand, putting the ini into the directory of ScummVM could raise problems when ScummVM is run of a CD....

Hm, it becomes clearer to me that the question where to put the ini's is not as simple as I thought....
User avatar
Jimbob
Posts: 307
Joined: Mon Oct 31, 2005 4:36 pm
Location: Somewhere in the UK

Post by Jimbob »

joachimeberhard wrote:I still would go with the ScummVM directory itself as the place to store the ini files by default.

Putting it into the Documents folder is not a bad idea, but still could lead to questions like "Where do I find it on my computer?", because it is possible to map the "Documents" to any path you like.

If you're on a ActiveDirectory domain for example, you most probably have the "Documents" redirected to the server anyway.

On the other hand, putting the ini into the directory of ScummVM could raise problems when ScummVM is run of a CD....

Hm, it becomes clearer to me that the question where to put the ini's is not as simple as I thought....
If you're going to say that, why not put it in the users registry? I guess this could be done but I'm not a Windows programmer (or user), so I'm just guessing!

Jimbob
joachimeberhard
ScummVM Team Member
Posts: 377
Joined: Sat Sep 24, 2005 12:25 pm
Location: Austria

Post by joachimeberhard »

Why not the registry?

Because ScummVM still likes to offer users with simple understanding of the OS to edit their options manually, if they like.

Compared to what you need to know to edit an ini file, editing the registry is most certainly out of most users scope....
User avatar
Jimbob
Posts: 307
Joined: Mon Oct 31, 2005 4:36 pm
Location: Somewhere in the UK

Post by Jimbob »

joachimeberhard wrote:Why not the registry?

Because ScummVM still likes to offer users with simple understanding of the OS to edit their options manually, if they like.

Compared to what you need to know to edit an ini file, editing the registry is most certainly out of most users scope....
I never have to edit the preferences file on Mac OS X so why would a Windows user have to edit the scummvm.ini by hand?

Jimbob
User avatar
Herrscher
Posts: 110
Joined: Sun Oct 30, 2005 5:17 pm

Post by Herrscher »

Please DON'T put it in the registry.

This is a mess to handle, edit, adminster, and backup... :shock: :evil: :!:
Post Reply