recommended: System.Environment.ProcessPath
This commit is contained in:
parent
fc25e73b1a
commit
fe2de6ecf7
2 changed files with 2 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ namespace AppScaffolding
|
||||||
: value;
|
: value;
|
||||||
|
|
||||||
#region appsettings.json
|
#region appsettings.json
|
||||||
private static string APPSETTINGS_JSON { get; } = Path.Combine(Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName), "appsettings.json");
|
private static string APPSETTINGS_JSON { get; } = Path.Combine(Path.GetDirectoryName(Environment.ProcessPath), "appsettings.json");
|
||||||
|
|
||||||
public static bool APPSETTINGS_Json_Exists => File.Exists(APPSETTINGS_JSON);
|
public static bool APPSETTINGS_Json_Exists => File.Exists(APPSETTINGS_JSON);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -149,8 +149,7 @@ namespace LibationAvalonia.Views
|
||||||
|
|
||||||
private void runWindowsUpgrader(string zipFile)
|
private void runWindowsUpgrader(string zipFile)
|
||||||
{
|
{
|
||||||
|
var thisExe = Environment.ProcessPath;
|
||||||
var thisExe = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
|
|
||||||
var thisDir = System.IO.Path.GetDirectoryName(thisExe);
|
var thisDir = System.IO.Path.GetDirectoryName(thisExe);
|
||||||
|
|
||||||
var args = $"--input {zipFile} --output {thisDir} --executable {thisExe}";
|
var args = $"--input {zipFile} --output {thisDir} --executable {thisExe}";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue