UnrealTournament.ini (original vs Virtual Store)

Discussions about UT99
handsomep
Novice
Posts: 9
Joined: Thu Jan 21, 2021 4:16 am

UnrealTournament.ini (original vs Virtual Store)

Post by handsomep » Fri Apr 16, 2021 8:22 pm

Bit of a technical question perhaps, but I noticed I have two different UnrealTournament.ini files, one in:

C:\Program Files (x86)\Unreal Tournament\System

and another in:

C:\Users\MYNAME\AppData\Local\VirtualStore\Program Files (x86)\Unreal Tournament\System

and I was wondering how that worked? The one in the Virtual Folder is updated each time I play and has a more recent time stamp. The setting I had in the "normal/original" location for MinDesiredFramerate is different than in the file in the virtual store.
Last edited by handsomep on Fri Apr 16, 2021 8:42 pm, edited 2 times in total.

Buggie
Masterful
Posts: 510
Joined: Sat Mar 21, 2020 5:32 am

Re: UnrealTournament.ini (original vs Virtual Store)

Post by Buggie » Fri Apr 16, 2021 8:35 pm

By default UnrealTournament.ini must be in System dir, not in Maps dir.
But in command line you can specify any location of it.

handsomep
Novice
Posts: 9
Joined: Thu Jan 21, 2021 4:16 am

Re: UnrealTournament.ini (original vs Virtual Store)

Post by handsomep » Fri Apr 16, 2021 8:37 pm

Sorry, I pasted the wrong directory. In both cases I'm referring to the file in the System folder.

User avatar
Barbie
Godlike
Posts: 2109
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: UnrealTournament.ini (original vs Virtual Store)

Post by Barbie » Fri Apr 16, 2021 9:30 pm

Applications installed within the "Program Files" folder Windows can usually not write to their installation folder if run without administrative previlegies. If they try, the write access is redirected to the folder %LOCALAPPDATA%\VirtualStore. See chapter Virtualization for example.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

handsomep
Novice
Posts: 9
Joined: Thu Jan 21, 2021 4:16 am

Re: UnrealTournament.ini (original vs Virtual Store)

Post by handsomep » Fri Apr 16, 2021 10:22 pm

Barbie wrote:
Fri Apr 16, 2021 9:30 pm
Applications installed within the "Program Files" folder Windows can usually not write to their installation folder if run without administrative previlegies. If they try, the write access is redirected to the folder %LOCALAPPDATA%\VirtualStore. See chapter Virtualization for example.
Interesting. So when Unreal runs, it loads UnrealTournament.ini in the "normal/original" Unreal System folder, but then saves any new settings/changes in the Virtual Store folder (if run without Administrative privileges) but the file in the Virtual Store is not READ from (to load settings) when the game is launched. So basically the file in the Virtual Store file is only used while the game is open so any changes while playing made are not remembered when the game is closed and reopened, is that about right? So how would you explain the change/override to the MinDesiredFrameRate in the Virtual Store folder?

User avatar
Barbie
Godlike
Posts: 2109
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: UnrealTournament.ini (original vs Virtual Store)

Post by Barbie » Sat Apr 17, 2021 2:29 am

handsomep wrote:
Fri Apr 16, 2021 10:22 pm
the file in the Virtual Store is not READ from (to load settings) when the game is launched
If this is the case then the overlay file system does not work proper, because that does not make any sense. Are you sure that UT does not read the modified INI file in the virtual store?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

handsomep
Novice
Posts: 9
Joined: Thu Jan 21, 2021 4:16 am

Re: UnrealTournament.ini (original vs Virtual Store)

Post by handsomep » Sun Apr 18, 2021 1:53 am

I am not sure, no. I probably jumped to the wrong conclusion. I think what actually happens, is that on the first run after installation, Unreal loads the UnrealTournament.ini in the original install location. Any changes made in game are made to the copy in the Virtual Store folder and that is the only file that ever gets read from then on out. If Unreal knows that it has already been run (and/or finds a copy of UnrealTournament.ini in the Virtual Store), it will ignore the file in the original install location (along with any modifications that you manually make to that file). Does that sound right?

User avatar
Barbie
Godlike
Posts: 2109
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: UnrealTournament.ini (original vs Virtual Store)

Post by Barbie » Sun Apr 18, 2021 12:03 pm

handsomep wrote:
Sun Apr 18, 2021 1:53 am
If Unreal knows that it has already been run
Probably the section "[FirstRun]" in the INI is responsible for this, but it's only a guess.
handsomep wrote:
Sun Apr 18, 2021 1:53 am
[UT] finds a copy of UnrealTournament.ini in the Virtual Store
You probably didn't get the idea of the Virtual Store: it is a operating system's file system layer and transparent for programs like UT. UT always says "hey, Windows, read (write) to C:\Program Files(x86)\UT\System\UnrealTournament.ini", but Windows redirects that access to C:\Users\%USERNAME%\AppData\Local\VirtualStore\Program Files (x86)\Unreal Tournament\System\UnrealTournament.ini. UT does not notice this.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett