mirror of
https://github.com/Jackett/Jackett
synced 2025-03-09 05:16:55 +00:00
parent
b212169dc2
commit
24160106d9
1 changed files with 6 additions and 6 deletions
|
@ -94,21 +94,21 @@ namespace Jackett.Tray
|
|||
|
||||
if (windowsService.ServiceExists() && windowsService.ServiceRunning())
|
||||
{
|
||||
//We won't be able to start the tray app up again from the updater, as when running via a windows service there is no interaction with the desktop
|
||||
//Fire off a console process that will start the tray 20 seconds later
|
||||
|
||||
var trayExePath = Assembly.GetEntryAssembly().Location;
|
||||
// We won't be able to start the tray app up again from the updater, as when running via a windows service
|
||||
// there is no interaction with the desktop.
|
||||
// Fire off a console process that will start the tray 30 seconds later
|
||||
var trayExePath = Process.GetCurrentProcess().MainModule.FileName;
|
||||
|
||||
var startInfo = new ProcessStartInfo()
|
||||
{
|
||||
Arguments = $"/c timeout 20 > NUL & \"{trayExePath}\" --UpdatedVersion yes",
|
||||
Arguments = $"/c timeout 30 > NUL & \"{trayExePath}\" --UpdatedVersion yes",
|
||||
FileName = "cmd.exe",
|
||||
UseShellExecute = true,
|
||||
CreateNoWindow = true,
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
};
|
||||
|
||||
logger.Info("Starting 20 second delay tray launch as Jackett is running as a Windows service: " + startInfo.FileName + " " + startInfo.Arguments);
|
||||
logger.Info($"Starting 30 second delay tray launch as Jackett is running as a Windows service: {startInfo.FileName} {startInfo.Arguments}");
|
||||
Process.Start(startInfo);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue