Skip to content

Commit

Permalink
Adding msStore verion, improve logging (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
flaeri authored Jan 15, 2022
1 parent 23840ad commit 9c20534
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions AddJavawPath.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ $mcSearchPaths = `
#Stock and Forge
"C:\Program Files (x86)\Minecraft Launcher\runtime", `
#Badlion
"C:\ProgramData\BadlionClient"
"C:\ProgramData\BadlionClient", `
#MsStore
"$env:LOCALAPPDATA\Packages\Microsoft.4297127D64EC6_8wekyb3d8bbwe\LocalCache\Local\runtime"

foreach ($item in $mcSearchPaths) {
write-host "-------------------------"
Write-Host "Testing $item" -ForegroundColor Yellow
write-host "`n"
if (test-path $item) {
write-host "Found: $item" -ForegroundColor Green
write-host "`n"
$javaWPath = (Get-ChildItem -Path $item -Filter javaw.exe -Recurse).fullname
foreach ($path in $javaWPath) {
write-host "Adding: $path" -ForegroundColor Green
write-host "`n"
Set-ItemProperty -path HKCU:\SOFTWARE\Microsoft\DirectX\UserGpuPreferences -Name $path -Value "GpuPreference=2;"
}
}
Expand Down

0 comments on commit 9c20534

Please sign in to comment.