Make Mod Config Files

Make ModConfig.txt in each game directory and update each main config file.

The tool it will cause a UAC prompt as the launcher starts itself as admin. This is so that ModConfig.txt can be created in each game directory. Icacls.exe command line tool is used to set users modify permissions on ModConfig.txt. The *_language_version.SkuDef file is read and updated with the line try-add-config ModConfig.txt. The later files will be copied and given a .bak extension as a backup so that you should not lose the file and it's contents.

The file ModConfig.txt is optional, though Kanes Wrath may not access mods without ModConfig.txt. Tiberium Wars and Red Alert 3 will use -modconfig on the command line if ModConfig.txt is not found. Paths in ModConfig.txt can be like normal paths though without, skudef names are limited to length... as they are displayed in the game ui listviews and are recorded in the replay files.

If one of the steps fail, then it will restart the loop and do the next game directory.

Icacls.exe command use arguments like /grant users:m. On english systems, users is a user account group. I do not know if the users group will exist on non-english systems.

If Make Mod Config Files is already setup for a game, then a MsgBox will ask to undo the make setup.

A related tool exists named Open Mod Config File. Even though it may open an editor with the file loaded. Editing this file should only be done only if absolutely needed as the launcher reads and writes to this file. The intended use for the tool is to view the file.