mirror of
https://github.com/seuyh/stellaris-dlc-unlocker.git
synced 2026-06-12 11:01:25 -07:00
fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#Requires -Version 5.1
|
||||
Set-StrictMode -Version Latest
|
||||
Set-StrictMode -Version 5.1
|
||||
$ErrorActionPreference = 'Stop'
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
Add-Type -AssemblyName PresentationFramework, PresentationCore, WindowsBase, System.Windows.Forms
|
||||
@@ -87,7 +87,8 @@ function Set-LangBuiltin([string]$lang) {
|
||||
}
|
||||
function Find-SteamPath {
|
||||
foreach ($h in 'HKCU:\Software\Valve\Steam','HKLM:\SOFTWARE\Valve\Steam','HKLM:\SOFTWARE\WOW6432Node\Valve\Steam') {
|
||||
$v = (Get-ItemProperty $h -ErrorAction SilentlyContinue)?.SteamPath
|
||||
$prop = Get-ItemProperty $h -ErrorAction SilentlyContinue
|
||||
$v = if ($null -ne $prop) { $prop.SteamPath } else { $null }
|
||||
if ($v -and (Test-Path $v)) { return $v }
|
||||
}
|
||||
foreach ($d in "$env:ProgramFiles(x86)\Steam","$env:ProgramFiles\Steam") { if (Test-Path $d) { return $d } }
|
||||
@@ -766,4 +767,4 @@ $installBtn.Add_Click({
|
||||
})
|
||||
|
||||
[void]$window.ShowDialog()
|
||||
$drainTimer.Stop()
|
||||
$drainTimer.Stop()
|
||||
|
||||
Reference in New Issue
Block a user