diff --git a/NewLife.Agent/CommandHandler/Install.cs b/NewLife.Agent/CommandHandler/Install.cs index f943be2..d2df02d 100644 --- a/NewLife.Agent/CommandHandler/Install.cs +++ b/NewLife.Agent/CommandHandler/Install.cs @@ -33,6 +33,11 @@ public override void Process(String[] args) if (exe.Contains(' ')) exe = $"\"{exe}\""; var dll = args[0].GetFullPath(); + if (!dll.Contains(".dll"))//没有获得到主程的dll + { + dll = Environment.CommandLine?.Split(' ')[0];//Assembly.GetExecutingAssembly().Location; + } + if (dll.Contains(' ')) dll = $"\"{dll}\""; if (fileName.EqualIgnoreCase("dotnet", "dotnet.exe", "java"))