if ((Player getVariable "SpareTime") > 0) then {...
« Changelog 18/09/2010Changelog 08/11/2009 »

New to ArmA 2 (1.05): Addons in 'My Documents'

Permalink 12/23/09 14:33, by jonas, Categories: ArmA

With 1.05 BIS added a new feature to ArmA 2: The possibility to load addons out of the 'My Documents'\ArmA 2 folder.

What's the advantage?

The advantage of that folder is very simple: Every program can now install/update addons, even without administrator rights. So updater like Six Updater won't need admin rights if they use that folder.


Why another folder?

A small excursion about windows right and folder management:

Windows is designed as a multi user system. And those user profiles can be stored on a central server. This has many advantages:

  • The user can log on every computer and will find the same settings and data.
  • Other user are not able to view his data.

But this requires that the program doesn't write into its own directory.  Instead it should use special folder provided by windows:

Appdata (%APPDATA%) and local appdata (%LOCALAPPDATA%).

Those folder are only accessible to its owner and no other user. And if using a 'remote' user, the appdata folder lays on the server. So a application should write its local data (like window position) in %LOCALAPPDATA% and its user specific data inside %APPDATA%.

Those rules exists since a long time, but not all applications kept with those rules. So Microsoft invented a 'feature' with Vista:

Program no longer can write into its own folder.

So back to ArmA 2:

This means that ArmA 2 can't write into its own folder, at least without administrator rights. So if a non administrator program will install or update addons, it will fail. The new space in 'My Documents'\ArmA 2\Addons allows e.g. to run Six Updater without administrator rights.


I don't need to implement right checking for RTE Capture :p

No, the main advantage is that ArmA 2 itself can download and install addons. Which means that, maybe in OA, it will be possible to join a server with different addons. ArmA would simple tell the user that some addons are missing and will offer to download them. And after downloading it will restart itself and successful join the server :D

A dream? Currently yes, but many aspects into 1.05 leads to this fiction.

Proof of concept?

Loading ArmA with -mod=DoesntExist which is a non existing folder:


arma2.exe  CreateFile  ArmA 2\DoesntExist\dta\
arma2.exe  CreateFile  ArmA 2\DoesntExist\bin\stringtable.xml
arma2.exe  CreateFile  ArmA 2\DoesntExist\bin\stringtable.csv
arma2.exe  CreateFile  ArmA 2\DoesntExist\languageCore\stringtable.xml
arma2.exe  CreateFile  ArmA 2\DoesntExist\languageCore\stringtable.csv
arma2.exe  CreateFile  ArmA 2\DoesntExist\bin\config.cpp
arma2.exe  CreateFile  ArmA 2\DoesntExist\bin\config.bin
arma2.exe  CreateFile  ArmA 2\DoesntExist\addons\
arma2.exe  CreateFile  My Documents\ArmA 2\DoesntExist\addons\
arma2.exe  CreateFile  ArmA 2\DoesntExist\Campaigns\

So it will look inside the 'My Documents' folder for the addon.


Comment from: Killswitch [Visitor]
KillswitchA twist on this is if you've used the -profile=... startup parameter when launching ArmA 2. In that case, -mod=DoesntExist will cause ArmA II to look for addons in the folder Users\%USERNAME%\DoesntExist\addons below the indicated -profile path. (%USERNAME% is the name of your Windows user)

Example: let's say your Windows username is "johndoe" and you launch ArmA II with

"-profile=D:\Games\ArmA 2" -mod=DoesntExist

This will make ArmA II look for addons in

D:\Games\ArmA 2\Users\johndoe\DoesntExist\addons

12/25/09 @ 11:03
Comment from: Crowe [Visitor]
With -profiles option you get an error each time you access a squad.xml with a squadlogo in Multiplayer.
05/16/10 @ 06:40