mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 03:07:56 +01:00
Use modules relative path (#13774)
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace Microsoft.PowerToys.Common.UI
|
namespace Microsoft.PowerToys.Common.UI
|
||||||
{
|
{
|
||||||
@@ -61,7 +62,9 @@ namespace Microsoft.PowerToys.Common.UI
|
|||||||
{
|
{
|
||||||
try
|
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
|
#pragma warning disable CA1031 // Do not catch general exception types
|
||||||
catch
|
catch
|
||||||
|
|||||||
Reference in New Issue
Block a user