Valorant-Ultrawide-Fix
Valorant-Ultrawide-Fix copied to clipboard
Multiple accounts or old installations of Valorant causes the install script to fail.
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
- Added self-elevating UAC prompt. This did not solve the issue.
- The error message is misleading since
Get-Content
is looking for a path. It has nothing to do with permissions. - Added Debug output for all path variables to find out why path strings aren't being concatenated properly.
- Moved $script:MyInvocation.MyCommand.Path to run before the UAC prompt to avoid getting assigned
C:\
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.
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.