NewLife/Stardust

在Windows下以特定用户[{0}]启动进程,大概率失败,因没有密码令牌
大石头 authored at 2025-10-19 09:28:29
864cf05
Tree
1 Parent(s) 30a8e30
Summary: 1 changed files with 4 additions and 0 deletions.
Modified +4 -0
Modified +4 -0
diff --git a/Stardust/Managers/ServiceController.cs b/Stardust/Managers/ServiceController.cs
index c6dc63e..29cfd47 100644
--- a/Stardust/Managers/ServiceController.cs
+++ b/Stardust/Managers/ServiceController.cs
@@ -473,6 +473,10 @@ public class ServiceController : DisposeBase
                 p = Process.GetProcessById((Int32)pid);
             }
         }
+        else if (Runtime.Windows && !user.IsNullOrEmpty())
+        {
+            WriteLog("在Windows下以特定用户[{0}]启动进程,大概率失败,因没有密码令牌", user);
+        }
         else
         {
             p = Process.Start(si);