diff --git a/WinTool/CommandLine/CreateFileParameter.cs b/WinTool/CommandLine/CreateFileParameter.cs index 06d38d6..183d357 100644 --- a/WinTool/CommandLine/CreateFileParameter.cs +++ b/WinTool/CommandLine/CreateFileParameter.cs @@ -35,7 +35,7 @@ public override string ToString() StringBuilder sb = new(ParameterName); if (FilePath is not (null or [])) - sb.Append($" {PathSubParameter}={FilePath}"); + sb.Append($" {PathSubParameter}=\"{FilePath}\""); if (Size > 0) sb.Append($" {SizeSubParameter}={Size}"); diff --git a/WinTool/Utils/ProcessHelper.cs b/WinTool/Utils/ProcessHelper.cs index 839e077..925a2b6 100644 --- a/WinTool/Utils/ProcessHelper.cs +++ b/WinTool/Utils/ProcessHelper.cs @@ -20,7 +20,7 @@ static ProcessHelper() var principal = new WindowsPrincipal(identity); _isAdmin = principal.IsInRole(WindowsBuiltInRole.Administrator); - _appDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!; + _appDirectory = Path.GetDirectoryName(Environment.ProcessPath)!; ProcessPath = Path.Combine(_appDirectory, "WinTool.exe"); } diff --git a/WinTool/WinTool.csproj b/WinTool/WinTool.csproj index 618c698..c22622c 100644 --- a/WinTool/WinTool.csproj +++ b/WinTool/WinTool.csproj @@ -11,6 +11,7 @@ https://github.com/arcanexhoax/WinTool WinTool is a utility that expands shortcuts for Windows Explorer, it adds shortcuts for useful functions that do not have it. Resources\icon.ico + win-x86 @@ -39,10 +40,6 @@ - - - -