Skip to main content
GameDev.net gamedev.net
🔒 Locked

Why do some games need adminstrator account?

Started by The C modest god Oct 27, 2006 at 5:49 AM 20 replies 2.4k views
Original Post
The C modest god
The C modest god
Why do some games need adminstrator account to install themself? There are games which are capabale to install themself also in User account. Should games be able to be installed with user account? Thanks in advance.
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower. Quote: Original post by Toolmaker Quote:
benryves
benryves
You tend to need administrator rights to write into Program Files. Hence a lot of (to my mind poorly-written) apps, which save to their own directory as opposed to in the settings directory, need administrator rights to even run properly, let alone just install.
[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]
Deyja
Deyja
Because in windows95 it wasn't a problem, and nobody has since told them better because 99% of users are running with administrative privledges anyway.
Emmanuel Deloget
Emmanuel Deloget
Requiring thet the user get some admin privilege to install the game is fine to me, because you need to access the registry and maybe to install components that would fit in the system directory.

But requiring admin privilege to run the game shows lazyness from the game developpers :)

Regards,
Zahlman
Zahlman
Quote:
Original post by benryves
You tend to need administrator rights to write into Program Files. Hence a lot of (to my mind poorly-written) apps, which save to their own directory as opposed to in the settings directory, need administrator rights to even run properly, let alone just install.


Don't you think it's a *little* surprising to the potential game writer that saving to your *own* directory might cause raise some questions about security (i.e. people not running as admin noting that they have to jump through hoops to install your game)?

Then again, I think lots of games (too many) really shouldn't require an installer *at all* (but do). What happened to the good old days when you could just drop an executable somewhere (almost anywhere), double-click it and it would just work (saving its files in the same folder)?
intrest86
intrest86
Quote:
Original post by Zahlman
Quote:
Original post by benryves
You tend to need administrator rights to write into Program Files. Hence a lot of (to my mind poorly-written) apps, which save to their own directory as opposed to in the settings directory, need administrator rights to even run properly, let alone just install.


Don't you think it's a *little* surprising to the potential game writer that saving to your *own* directory might cause raise some questions about security (i.e. people not running as admin noting that they have to jump through hoops to install your game)?

Vista (unless something changed) should be taking care of this. Programs writing to Program Files when they shouldn't be will think that they have succeeded, when it is really stored elsewhere.
Turring Machines are better than C++ any day ^_~
xycsoscyx
xycsoscyx
Quote:
Original post by intrest86
Vista (unless something changed) should be taking care of this. Programs writing to Program Files when they shouldn't be will think that they have succeeded, when it is really stored elsewhere.


This will only be true if MicroSoft ships a compatibility fix (built in, you're not supposed to be able to modify it) specifically for the program. Normally, file write operations to Program Files (and Windows) will simply fail, but MicroSoft can supply a SHIM fix to redirect those operations to a temp location. The same is true for the registry, it will simply fail unless virtualization has been enabled (this still seems a bit wonky and inconsistent on when it fails and when it virtualizes, though).
Raghar
Raghar
Quote:
Original post by Zahlman
Quote:
Original post by benryves
You tend to need administrator rights to write into Program Files. Hence a lot of (to my mind poorly-written) apps, which save to their own directory as opposed to in the settings directory, need administrator rights to even run properly, let alone just install.


Don't you think it's a *little* surprising to the potential game writer that saving to your *own* directory might cause raise some questions about security (i.e. people not running as admin noting that they have to jump through hoops to install your game)?

Then again, I think lots of games (too many) really shouldn't require an installer *at all* (but do). What happened to the good old days when you could just drop an executable somewhere (almost anywhere), double-click it and it would just work (saving its files in the same folder)?


They added registry and list of installed programs, so easy to add/remove programs were not entirely in favor of developers.

You could still use programs like Dungeon crawl, or my programs without problem... If you are using administrative account, or if you allowed read/write into installed directory.

When I use Linux I create several directories in root, and chmod them to allow read write access for everyone. If someone would destroy work of other it's his problem because they can't behave politely enough to share ONE computer. In fact theirs home directory is just a directory for a settings. If they would crush KDE/GNOME purge appropriate settings if they'd be found, otherwise backup data and purge home directory.

With windoze situation is more complicated. Writing into documents and settings directory is BAD idea. It's often at the same place as the installation of windoze, thus after game writes approx 2 GB windoze would have 5 MB of free disk space. Transferring that directory somewhere else, for example into drive where games are installed defeats reason for documents and settings directory. One of VERY bad result is disk fragmentation. The other and more serious result is significantly slower scan disk. While majority of users are too lazy to do regular once per week scandisk on the same disk as they have important data (and or OS directory), the minority with a brain is severally handicapped. scandisk of 15 GB is significantly faster than scandisk of 150 GB, especially if there are problems.

Majority of users have windoze at simplified settings, this means access to file allowed, yes/no.
Deyja
Deyja
Quote:
Writing into documents and settings directory is BAD idea.
You're supposed to write there.

Quote:
approx 2 GB windoze would have 5 MB of free disk space.
First, game saves don't take up much space. Second, people have bigger harddrives than that.


Quote:
If someone would destroy work of other it's his problem because they can't behave politely enough to share ONE computer.
Wait, so, it's the problem of the one doing the destroying? How absurd. It won't be his problem until his big sister comes and smashes his face in for deleting her book report.

Quote:
The other and more serious result is significantly slower scan disk. While majority of users are too lazy to do regular once per week scandisk on the same disk as they have important data (and or OS directory), the minority with a brain is severally handicapped. scandisk of 15 GB is significantly faster than scandisk of 150 GB, especially if there are problems.
Of course it's faster. It's a linear algoritm. To suggest it's not affected by dataset size is absurd. What I don't get, however, is how not saving game settings to documents and setting compresses 150GBs of data into 15GB.

Another thing you seem to be failing to notice is that most people only have one harddrive. It doesn't matter what directory they save it in, it's still 'the same place'.
maximAL
maximAL
Quote:
Original post by Deyja
Quote:
Writing into documents and settings directory is BAD idea.
You're supposed to write there.


you know, after many years with several windead + format c: rituals i just don't want any sensitve data on my win partition.

can one actually move this directory somewhere else? i haven't found the option yet. same goes for the program files folder, that also defaults to c:, making me manually change to path to d:\program files all the time (and get mad about apps that install on c: anyway).
------------------------------------------------------------Jawohl, Herr Oberst!
Smit
Smit
maximAL:

You can change the location to whatever you want. My Windows XP install is on one partition and my documents on another.
paulecoyote
paulecoyote
Goodness, lots of Windows haters getting their teeth in!

You need to be an administrator to be able write to parts of the hard disk that are marked administrators only.

Installing system wide things like Direct X require you to be an administrator because it has the potential to screw up the system.

Games that require registry write access outside HKEY_CURRENT_USER would also likely be denied, for the same reason.

Writing user specific things (eg save games) to the users home directory is seen as best practice; not just in Windows world but in *nix and Macland so I don't know what all the bitching was about there.

Simplier games, or game installers that can rely on shared libraries already being installed system wide and don't require write access to the registry do not require admin rights to use. Often then can be run just by double clicking the exe. That can still be denied though depending on how tight security policy has been set up, but that's a whole different kettle of herring [wink]
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
markr
markr
Another possibility is that the games need admin rights to do various cd copy-protection and anti-hack malarky.

Some games install an NT kernel driver of some kind which presumably does some checking that you're not pirating it.

Mark
Raghar
Raghar
Quote:
Original post by Deyja
Quote:
Writing into documents and settings directory is BAD idea.
You're supposed to write there.

User of computer has right to write where he wants. If he is installing a game on some HD he should expect the game believe that disk is read/write, and it could have free reign for data caching, and save files. It should tell user during install where would be data files. Civilization IV solved it by linking into documents and settings directory, some other games don't bother to do even that.

Quote:
Quote:
approx 2 GB windoze would have 5 MB of free disk space.
First, game saves don't take up much space. Second, people have bigger harddrives than that.

Have you looked? 500+ MB isn't that rare.

Quote:
Quote:
The other and more serious result is significantly slower scan disk. While majority of users are too lazy to do regular once per week scandisk on the same disk as they have important data (and or OS directory), the minority with a brain is severally handicapped. scandisk of 15 GB is significantly faster than scandisk of 150 GB, especially if there are problems.
Of course it's faster. It's a linear algoritm. To suggest it's not affected by dataset size is absurd. What I don't get, however, is how not saving game settings to documents and setting compresses 150GBs of data into 15GB.

Compress? About what are you talking about?

Quote:
Another thing you seem to be failing to notice is that most people only have one harddrive. It doesn't matter what directory they save it in, it's still 'the same place'.

Different partition doesn't mean different drive. Scandisk of 15 GB partition C is faster than scandisk of 150 GB of partition D. Both of these are much faster than scandisk of one HUGE 500 GB HD.
maximAL
maximAL
Quote:
Original post by Smit
maximAL:

You can change the location to whatever you want. My Windows XP install is on one partition and my documents on another.

...and how? short googling turned out you have to set it on installtion or do some nasty c&p along with registry-editing.

------------------------------------------------------------Jawohl, Herr Oberst!
Oluseyi
Oluseyi
Quote:
Original post by maximAL
Quote:
Original post by Smit
You can change the location to whatever you want. My Windows XP install is on one partition and my documents on another.

...and how?

Right-click My Documents folder icon, select Properties. Click Move.... Select new location, press OK.
Promit
Promit
Observations:
* The My Documents directory is considerably easier to relocate than the Documents and Settings directory, so I'd suggest saving in there. Several games use My Games\, though it's not an official convention. Personally, I rather like doing this. (AoE 3, Halo/Halo CE, Civ 4, and Fable all live in there on my system.)
* Vista virtualizes all writes to Program Files when not running with privileges (and possibly other directories as well, I haven't checked). They get redirected to an alternate per user location. This works for any program, as it's built into the file system layer.
* You will not pass Windows Logo requirements if you are saving anywhere other than some area of Documents and Settings, most likely Application Data or My Documents. (The only game related thing I see in my Application Data is Xfire.) So, despite Raghar's bizarre and nonsensical objections, you do not have a choice in the matter. As in the first point, My Documents is trivially easy to relocate, so that's where I prefer to send these things.
* Registry is similarly limited to HKCU during normal run. Why do games use the registry anyway? What the hell are you people keeping in there? Use per user profiles kept with the save games, ffs.
* Keeping user saves and data separate is a good thing. I still think that you should allow multiple in-game profiles per user, but I should have the ability to lock other people using my computer away from my data, which includes game configurations and saves.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
_the_phantom_
_the_phantom_
Quote:
Original post by Promit
* Keeping user saves and data separate is a good thing. I still think that you should allow multiple in-game profiles per user, but I should have the ability to lock other people using my computer away from my data, which includes game configurations and saves.


so maybe something like;

My Documents\My Games\\\settings.cfg
My Documents\My Games\\\saves\*

?
Deyja
Deyja
Quote:
Different partition doesn't mean different drive. Scandisk of 15 GB partition C is faster than scandisk of 150 GB of partition D. Both of these are much faster than scandisk of one HUGE 500 GB HD
In this context, it doesn't matter. Different partition, different physical drive - who cares; the vast majority of users only have on physical drive, and just one partition.

As for the rest of your "points", please restate them in a language I speak.
Promit
Promit
Quote:
Original post by phantom
Quote:
Original post by Promit
* Keeping user saves and data separate is a good thing. I still think that you should allow multiple in-game profiles per user, but I should have the ability to lock other people using my computer away from my data, which includes game configurations and saves.


so maybe something like;

My Documents\My Games\\\settings.cfg
My Documents\My Games\\\saves\*

?
Makes sense to me.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.