crocokyle / Valorant-Ultrawide-Fix

Scales the UI and game to an ultrawide ratio without stretching. This does not increase horizontal FOV and does decrease vertical FOV
27 stars 2 forks source link

Multiple accounts or old installations of Valorant causes the install script to fail. #3

Open crocokyle opened 3 years ago

crocokyle commented 3 years ago
Get-Content : Access to the path 
'C:\Users\<user>\AppData\Local\VALORANT\Saved\Config\2d1c7717-2939-5a37-9c3f-88697b734759\Windows' is denied.
At C:\Users\<user>\Downloads\Valorant-Ultrawide-Fix-main\SysSetup.ps1:53 char:29
+     $existingSettingsfile = Get-Content $ExistingSettings
+                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (C:\Users\qeeyo\...b734759\Windows:String) [Get-Content], 
UnauthorizedAccessException
    + FullyQualifiedErrorId : GetContentReaderUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetContentCommand
Get-Content : Access to the path 'C:\Users\<user>\AppData\Local\VALORANT\Saved\Config\2d1c7717-2939-5a37-9c3f-88697b734759\Windows' is denied.
At C:\Users\<user>\Downloads\Valorant-Ultrawide-Fix-main\SysSetup.ps1:53 char:29
+     $existingSettingsfile = Get-Content $ExistingSettings
+                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (C:\Users\<user>\...b734759\Windows:String) [Get-Content], UnauthorizedAccessException
    + FullyQualifiedErrorId : GetContentReaderUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetContentCommand
crocokyle commented 3 years ago
crocokyle commented 3 years ago

This issue occurs when users have multiple accounts or old installations of Valorant. It causes the script to fail because there are multiple tokenized folders in AppData\Local\VALORANT\Saved\Config

Plan is to implement a loop for each tokenized folder.

crocokyle commented 3 years ago

For users who want a workaround, you'll want to only delete the only the single folders that looks like

AppData\Local\VALORANT\Saved\Config\bd20b341-ef13-542a-bcf7-dc3523cc43c9

which corresponds to your old account. For myself, I was able to identify the unused folders by logging in to my active account in Valorant, then look at the folders to see which had a date modified of today. Then I just deleted the folders that were not modified today.

If you are worried about making a mistake, you can always move the folders somewhere else as a backup and then put it back if something breaks.