forked from couleur-tweak-tips/TweakList
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3422af0
commit 0a52617
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Path to the .ini file | ||
$iniFilePath = "$env:LocalAppData\EpicGamesLauncher\Saved\Config\Windows\GameUserSettings.ini" | ||
|
||
|
||
Stop-Process -Name "Epic*" -Force | ||
# Define the replacements | ||
$replacements = @{ | ||
"DisableGameTabs=\w+" = "DisableGameTabs=False" | ||
"NotificationsEnabled_Adverts=\w+" = "NotificationsEnabled_Adverts=False" | ||
"NotificationsEnabled_FreeGame=\w+" = "NotificationsEnabled_FreeGame=False" | ||
"MinimiseToSystemTray=\w+" = "MinimiseToSystemTray=False" | ||
"OfflineMode=\w+" = "OfflineMode=False" | ||
"Allow_InstallsWhileEditorsRunning=\w+" = "Allow_InstallsWhileEditorsRunning=False" | ||
"LastActiveTab=\w+" = "LastActiveTab=" | ||
"DownloadRateLimitEnabled=\w+" = "DownloadRateLimitEnabled=False" | ||
"CloudSaveEnabled=\w+" = "CloudSaveEnabled=False" | ||
#CloudSaveEnabled=True | ||
#DownloadRateLimitEnabled=False | ||
|
||
|
||
|
||
#MinimiseToSystemTray=True | ||
#Allow_InstallsWhileEditorsRunning=False | ||
|
||
#OfflineMode=False | ||
} | ||
|
||
# Read the content of the .ini file | ||
$iniContent = Get-Content -Path $iniFilePath -Raw | ||
|
||
# Perform the replacements | ||
foreach ($pattern in $replacements.Keys) { | ||
$replacement = $replacements[$pattern] | ||
$iniContent = $iniContent -replace $pattern, $replacement | ||
} | ||
|
||
# Write the updated content back to the .ini file | ||
$iniContent | Out-File -Encoding Default -FilePath $iniFilePath | ||
|
||
# Echo the changes | ||
$updatedContent = Get-Content -Path $iniFilePath | ||
foreach ($key in $replacements.Keys) { | ||
$replacement = $replacements[$key] | ||
$updatedLine = $updatedContent | Select-String -Pattern $replacement | ||
if ($updatedLine) { | ||
Write-Host $updatedLine | ||
} | ||
} | ||
|
||
Write-Host "The specified keys have been updated to 'True' in '$iniFilePath'." |