mirror of
https://github.com/Jackett/Jackett
synced 2025-03-09 21:54:51 +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())
|
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
|
// We won't be able to start the tray app up again from the updater, as when running via a windows service
|
||||||
//Fire off a console process that will start the tray 20 seconds later
|
// there is no interaction with the desktop.
|
||||||
|
// Fire off a console process that will start the tray 30 seconds later
|
||||||
var trayExePath = Assembly.GetEntryAssembly().Location;
|
var trayExePath = Process.GetCurrentProcess().MainModule.FileName;
|
||||||
|
|
||||||
var startInfo = new ProcessStartInfo()
|
var startInfo = new ProcessStartInfo()
|
||||||
{
|
{
|
||||||
Arguments = $"/c timeout 20 > NUL & \"{trayExePath}\" --UpdatedVersion yes",
|
Arguments = $"/c timeout 30 > NUL & \"{trayExePath}\" --UpdatedVersion yes",
|
||||||
FileName = "cmd.exe",
|
FileName = "cmd.exe",
|
||||||
UseShellExecute = true,
|
UseShellExecute = true,
|
||||||
CreateNoWindow = true,
|
CreateNoWindow = true,
|
||||||
WindowStyle = ProcessWindowStyle.Hidden
|
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);
|
Process.Start(startInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue