RePlays
RePlays copied to clipboard
Implement different method for adding non-game applications
It's not really possible for end users to add programs like Windows Terminal, which is installed installed via the Microsoft Store, to the do not record list.
Programs installed via the Microsoft Store end up in a (historically) non standard location that needs some technical know how to access. Without being able to access that location you can't provide a full executable path to RePlays.. and without that, the program can't be blocked.
A dropdown of running processes to pick from could be a more user friendly way in general.. from there we can use process info to get a full path.
For Windows Terminal the executable path ends up looking something like:
C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.14.1962.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
The dropdown route doesn't come without it's own problems though. As you can see from the Windows Terminal executable path... that path is only going to be good till the app gets an update and the version changes.
Maybe we implement some way to handle executables in C:\Program Files\WindowsApps\
a little differently.. and if the executable path contains
C:\Program Files\WindowsApps\
we just check if the executable name matches rather than checking against the whole path.
Is this still relevant? Fells like this can be implemented at a later time.
Basically we need a way to detect Microsoft store apps
Pushed a commit to somewhat solve one of the two issues (path changing on app updates).
By calculating path similarity using the Levenshtein distance algorithm, we can check if the path has a similarity of more than 75% match.
This solution may cause false positives down the line, but I think this is good enough.
(Fake scenario) Test against the following paths:
string path1 = @"C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.14.1962.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe";
string path2 = @"C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.15.8907.0_x64__8wsjkiysdaqwe\WindowsTerminal.exe";
CalculateStringSimilarity(path1, path2); // 0.8857143
Not tested in a real scenario, but assuming it will work. Let me know if there are any issues with this method.