Patch management on XP, Vista and Win 7
by David McDonald · in Torque 3D Professional · 06/03/2010 (6:53 pm) · 3 replies
We are working on a patch solution for our project and have hit a small snag. Our patching is based on www.torquepowered.com/community/resouces/view/10800
How are people getting around the process of updating files in the installed game directory without requiring admin access (and causing the prompt?)
The current process for reference:
1. Game exe fires up and checks the existing local manifest with a remote one (Works fine)
2. If the hash is different it compares and downloads any files required
-- first problem is here as it tries to write to a tmp directory in the game dir and requires admin for this.
-- Is there any simple way to use Windows variables (%HOMEPATH%) to make the tmp dir?
3. Once the files are downloaded the patch.exe program copies them into the game locations
-- Again an issue as now patch.exe would need admin provs as well.
Now this also extends past just the patching as the exe needs to write the prefs.cs out.
Ideally we could solve half the problem if we can access a clients Windows variables %APPDATA% or %HOMEPATH% however I believe there is an inherent restriction in Torque for doing this.
Does anyone have a workaround for this issue or is everyone just running the programs as admin and prompting users for access everytime they execute their patchers and game exes?
How are people getting around the process of updating files in the installed game directory without requiring admin access (and causing the prompt?)
The current process for reference:
1. Game exe fires up and checks the existing local manifest with a remote one (Works fine)
2. If the hash is different it compares and downloads any files required
-- first problem is here as it tries to write to a tmp directory in the game dir and requires admin for this.
-- Is there any simple way to use Windows variables (%HOMEPATH%) to make the tmp dir?
3. Once the files are downloaded the patch.exe program copies them into the game locations
-- Again an issue as now patch.exe would need admin provs as well.
Now this also extends past just the patching as the exe needs to write the prefs.cs out.
Ideally we could solve half the problem if we can access a clients Windows variables %APPDATA% or %HOMEPATH% however I believe there is an inherent restriction in Torque for doing this.
Does anyone have a workaround for this issue or is everyone just running the programs as admin and prompting users for access everytime they execute their patchers and game exes?
About the author
After many years in the professional business end of the IT industry I am working with a small group of friends to enter the indie game development market.
#2
You'll want to hit the Local folder present at %LOCALAPPDATA% - you'd need to check yourself if its available on XP and other legacy platforms you wish to support.
06/04/2010 (3:30 pm)
Please consider that %appdata% puts you in the /roaming folder which means that your files will then subject to synchronization when logging on/off on domain-joined machines.You'll want to hit the Local folder present at %LOCALAPPDATA% - you'd need to check yourself if its available on XP and other legacy platforms you wish to support.
#3
The service option looks like a good choice further down the track. At this point in the cycle just using %LOCALAPPDATA% may do the trick for us.
06/04/2010 (5:19 pm)
Excellent thanks guys will give that a go.The service option looks like a good choice further down the track. At this point in the cycle just using %LOCALAPPDATA% may do the trick for us.
Associate Manoel Neto
Default Studio Name
The absolutely non-admin way would be downloading your new binaries somewhere in %APPDATA% and using those instead.
If you really want to update the EXE in program files, create a service whose sole purpose is to copy/download files into your program install folder, and install that service during your game install (since the user needs to provide admin rights to install the game anyway). This is how Steam manages to download/update games into Program Files.