ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > Help and Support > Location of scummvm.ini Goto page 1, 2, 3  Next
Location of scummvm.ini
  Author    Thread Reply to topic
Dark-Star



Joined: 30 Oct 2005
Posts: 128
Location: Reutlingen, GERMANY
Location of scummvm.ini 

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

 Reply with quote  
Post Tue Dec 13, 2005 5:03 pm 
 View user's profile Send private message
joachimeberhard
ScummVM Team Member


Joined: 24 Sep 2005
Posts: 378
Location: Austria
 

I just copy paste my thoughts expressed in a different thread here for completion:


quote:

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





quote:

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


 Reply with quote  
Post Tue Dec 13, 2005 5:16 pm 
 View user's profile Send private message
Dark-Star



Joined: 30 Oct 2005
Posts: 128
Location: Reutlingen, GERMANY
 

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:


quote:
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
 Reply with quote  
Post Tue Dec 13, 2005 5:51 pm 
 View user's profile Send private message
clem



Joined: 31 Oct 2005
Posts: 2185
 

somebody once mentioned that you're not supposed to write to the application's directory either as an end-user

 Reply with quote  
Post Tue Dec 13, 2005 5:58 pm 
 View user's profile Send private message
LogicDeLuxe



Joined: 10 Nov 2005
Posts: 387
 

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.

quote:
Originally posted by clem
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.
 Reply with quote  
Post Tue Dec 13, 2005 7:20 pm 
 View user's profile Send private message
joachimeberhard
ScummVM Team Member


Joined: 24 Sep 2005
Posts: 378
Location: Austria
 

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:


quote:

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.


 Reply with quote  
Post Tue Dec 13, 2005 7:35 pm 
 View user's profile Send private message
Kaminari



Joined: 24 Oct 2005
Posts: 274
Location: Paris, France
 

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:
D:\Emulation\ScummVM\ScummVM.exe -cScummVM.ini



Problem solved.
 Reply with quote  
Post Wed Dec 14, 2005 12:57 am 
 View user's profile Send private message Visit poster's website
LogicDeLuxe



Joined: 10 Nov 2005
Posts: 387
 

quote:
Originally posted by Kaminari
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.
quote:
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:
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.
 Reply with quote  
Post Wed Dec 14, 2005 11:43 am 
 View user's profile Send private message
joachimeberhard
ScummVM Team Member


Joined: 24 Sep 2005
Posts: 378
Location: Austria
 

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

 Reply with quote  
Post Wed Dec 14, 2005 12:39 pm 
 View user's profile Send private message
Herrscher



Joined: 30 Oct 2005
Posts: 110
 

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.

 Reply with quote  
Post Thu Dec 15, 2005 12:00 am 
 View user's profile Send private message
joachimeberhard
ScummVM Team Member


Joined: 24 Sep 2005
Posts: 378
Location: Austria
 

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

 Reply with quote  
Post Thu Dec 15, 2005 12:52 pm 
 View user's profile Send private message
Jimbob



Joined: 31 Oct 2005
Posts: 305
Location: Somewhere in the UK
 

quote:
Originally posted 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....


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
 Reply with quote  
Post Thu Dec 15, 2005 1:05 pm 
 View user's profile Send private message
joachimeberhard
ScummVM Team Member


Joined: 24 Sep 2005
Posts: 378
Location: Austria
 

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

 Reply with quote  
Post Thu Dec 15, 2005 1:15 pm 
 View user's profile Send private message
Jimbob



Joined: 31 Oct 2005
Posts: 305
Location: Somewhere in the UK
 

quote:
Originally posted 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....


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
 Reply with quote  
Post Thu Dec 15, 2005 1:27 pm 
 View user's profile Send private message
Herrscher



Joined: 30 Oct 2005
Posts: 110
 

Please DON'T put it in the registry.

This is a mess to handle, edit, adminster, and backup... Shocked Evil or Very Mad Exclamation

 Reply with quote  
Post Thu Dec 15, 2005 1:49 pm 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 
Goto page 1, 2, 3  Next


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge