fix pwsh argument

This commit is contained in:
qhy040404
2023-12-15 19:26:17 +08:00
parent 9f793670fe
commit c947c759b8
2 changed files with 2 additions and 4 deletions

View File

@@ -40,10 +40,7 @@ internal static class RegistryInterop
string base64 = Convert.ToBase64String(target);
string path = $"HKCU:{GenshinPath}";
string command = $"""
$value = [Convert]::FromBase64String('{base64}');
Set-ItemProperty -Path '{path}' -Name '{SdkChineseKey}' -Value $value -Force;
""";
string command = $"-Command \"$value = [Convert]::FromBase64String('{base64}'); Set-ItemProperty -Path '{path}' -Name '{SdkChineseKey}' -Value $value -Force;\"";
ProcessStartInfo startInfo = new()
{

View File

@@ -254,6 +254,7 @@ internal sealed partial class LaunchGameViewModel : Abstraction.ViewModel
}
else
{
await taskContext.SwitchToMainThreadAsync();
GamePathEntries = launchOptions.GetGamePathEntries(out GamePathEntry? entry);
UpdateSelectedGamePathEntry(entry, false);
}