Jump to content

Check us out:

Photo
- - - - -

Running ET without Administrator


  • Please log in to reply
5 replies to this topic

#1
Bill

Bill

    Postin Ain't Easy

  • Bunker Admins
  • 540 posts
  • Gender:Male
  • Server:Bunker #1
Click to view battle stats
Hi Guys, I just finished figuring this out, so I decided to write it down. I'm using Windows Vista, but I think it works in any version of Windows.

Enemy Territory needs Administrator access for one reason: to save files into Program Files. The simplest way to get around this is to install ET into a different folder. But there’s a better way, because ET uses three path variables: fs_basepath, fs_homepath, and fs_cdpath. When ET looks for a file, it searches fs_homepath first, then fs_basepath, and finally fs_cdpath. When ET saves a new file, it always saves to fs_homepath. The fs_game variable is automatically set by a mod, and it determines which subfolder to use, such as etpub.

You’d think you could just set fs_homepath to a private folder for each user. This works perfectly in Linux, but not in Windows. The problem is that the ET source code assumes that fs_homepath is the same as fs_basepath in Windows. If you try this, it saves your CFGs correctly, and it downloads PK3s correctly. But it doesn’t load the etpub DLLs: cgame_mp_x86.dll and ui_mp_x86.dll. These DLLs are extracted into fs_homepath, but the Sys_LoadDll function (from win_main.c) only searches fs_basepath when trying to load them. It falls back to loading the default DLLs instead, so it actually still lets you play. But none of the etpub client stuff works: national flags, lagometer, prediction, etc.

Since fs_homepath must be the same as fs_basepath, the only answer is to set both of these to the user folder. Then, use fs_cdpath to point to the install folder in Program Files. This seems to work, with one exception. That Sys_LoadDll function won’t extract the etmain DLLs from mp_bin.pk3. So you have to copy all the DLLs from the etmain folder into the user folder first.

Punkbuster also needs Administrator access, but this is solved in the newer versions by installing a Windows service. As long as PB is up to date, it doesn’t require ET to be running as Administrator.

So, here's what to do:

  • Install ET into its default path: C:\Program Files\Wolfenstein - Enemy Territory
  • Download pbsvc.exe from evenbalance.com, and run it. This installs the PB services: PnkBstrA and PnkBstrB.
  • Download pbsetup.zip from evenbalance.com, extract it, and run pbsetup.exe. This updates the PB DLLs so they use the PB services. Otherwise, they would probably ignore the PB services and return INADEQUATE O/S PRIVILEGES or MISSING/CORRUPTED WINDOWS API FUNCTION until the first self-update.
  • Modify the ET shortcut: "C:\Program Files\Wolfenstein - Enemy Territory\ET.exe" +set fs_basepath C:\Users\Bill\et +set fs_homepath C:\Users\Bill\et +set fs_cdpath C:\PROGRA~1\WOLFEN~1
  • Copy qagame_mp_x86.dll, cgame_mp_x86.dll, and ui_mp_x86.dll from C:\PROGRA~1\WOLFEN~1\etmain to C:\Users\Bill\et.
I think you can also just modify the shortcut's working directory (or "Start in" path) instead of settings fs_basepath and fs_homepath, but I didn't test it.

Why go through all this trouble? First, it separates downloaded content from the default game install folder. To go back to a clean install, just delete C:\Users\Bill\et. Also, it lets multiple users have their own private folder without needing a full install. This saves about 300 MB per user.

Even if you are the only user on the computer, I’d still recommend doing this for the enhanced security. There are no restrictions on what those etpub DLLs can do. Anytime you connect to a server running a mod, you are basically downloading and running an EXE that the server sends you. Hopefully the server admin is trustworthy and is not sending you a virus/trojan/etc.

The best is to create a separate user account just for games. Logon as this account and make sure it can’t even read any of your documents. Then always use this account to run the game. Any malicious DLLs would only have access to what the user can see.
  • Falkes, Nevermore, UndeadWarrior and 2 others like this

#2
PATRIOT

PATRIOT

    Sticking Around

  • Bunker Admins
  • 1,073 posts
  • Gender:Male
  • Location:New Jersey USA
  • Server:Unselected
Click to view battle stats
:icon_eek: :screwy: :banned: :bounce: :yikes: :blink: :help: :hmmm: :baby: :rtf: :sp: :pc: :cry: :huh: :spam: :w00t: :mail: :seek: :vava: :wacko: :crazy: :words: :coffee: :wavecry: :morepics: :nukecloud:
  • djvidi likes this

#3
UndeadWarrior

UndeadWarrior

    Will Become Famous Soon Enough

  • Bunker Admins
  • 2,401 posts
  • Gender:Male
  • Location:Belgium - Beringen
  • Server:Bunker #2
Click to view battle stats
i think ill just stick to the right click and run as adminastrator.

Edited by UndeadWarrior, 12 September 2010 - 09:33 PM.


#4
peyote

peyote
  • Gender:Male
  • Location:Basel
  • Server:Bunker #2
Click to view battle stats
Good post.. thanks, moved it to FAQ section..

#5
mandinghino

mandinghino

    Ding is Dong

  • Bunker Members
  • 229 posts
  • Gender:Male
  • Location:5th Dimension (Closer than ever!)
  • Server:Bunker #1
Click to view battle stats
Install Linux, much safer ;-)

#6
-=BRASIL=-

-=BRASIL=-
  • Gender:Male
  • Location:Brasil (Rio de Janeiro) Copacabana Beach
  • Server:Unselected
Click to view battle stats
!! Just UP to refresh the mind of few guys :)