mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 14:59:16 +08:00
Use modules relative path (#13774)
This commit is contained in:
parent
4803180bcf
commit
65e5b40223
@ -4,6 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
namespace Microsoft.PowerToys.Common.UI
|
||||
{
|
||||
@ -61,7 +62,9 @@ namespace Microsoft.PowerToys.Common.UI
|
||||
{
|
||||
try
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(Environment.CurrentDirectory + "\\PowerToys.exe") { Arguments = "--open-settings=" + SettingsWindowNameToString(window) });
|
||||
var assemblyPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
|
||||
var fullPath = Directory.GetParent(assemblyPath).FullName;
|
||||
Process.Start(new ProcessStartInfo(fullPath + "\\..\\PowerToys.exe") { Arguments = "--open-settings=" + SettingsWindowNameToString(window) });
|
||||
}
|
||||
#pragma warning disable CA1031 // Do not catch general exception types
|
||||
catch
|
||||
|
Loading…
Reference in New Issue
Block a user