Skip to content

Commit

Permalink
[feat]星尘发布,在windows系统中,用户$表示创建前台桌面进程,用户$$表示创建隐藏窗口的前台桌面进程
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Dec 28, 2024
1 parent 6c90e1b commit 13671a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Stardust/Managers/ServiceController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ public Boolean Start()
Process? p = null;

// Windows桌面用户运行
if (Runtime.Windows && service.UserName == "$")
if (Runtime.Windows && (service.UserName == "$" || service.UserName == "$$"))
{
// 交互模式直接运行
if (Environment.UserInteractive)
Expand All @@ -419,7 +419,7 @@ public Boolean Start()
{
// 桌面用户运行
var desktop = new Desktop { Log = Log };
var pid = desktop.StartProcess(si.FileName, si.Arguments, si.WorkingDirectory);
var pid = desktop.StartProcess(si.FileName, si.Arguments, si.WorkingDirectory, service.UserName == "$$", true);
p = Process.GetProcessById((Int32)pid);
}
}
Expand Down

0 comments on commit 13671a1

Please sign in to comment.