DesktopInfo 作为 Windows 服务启动但没有任何反应

时间:2021-04-24 15:13:40

标签: windows service winsw

因为无法在 WinSW (https://github.com/winsw/winsw/issues/815) 中使用 public class MyClass { public static void main(String args[]) { int Test1; Test1 = (int) Math.ceil(14.8); System.out.println("Test1 ---> " + Test1); // Test1 ---> 15 System.out.println("Test2 ---> " + Math.ceil(148 / 10)); // Test2 ---> 14.0 double Test3 = Math.ceil(148L / 10.0); System.out.println("Test3 ---> " + Test3); // Test3 ---> 15.0 } } 硬链接和环境变量,所以我创建了一个符号链接:C:\ProgramData 用于 DesktopInfo(与 Chocolatey 一起安装) ).

这个新服务的日志是

mklink C:\services\DesktopInfo.exe C:\ProgramData\chocolatey\lib\desktopinfo\tools\DesktopInfo.exe

因此,他已正确启动,但什么也没出现……我必须手动启动 2021-04-24T17:08:06.380 DEBUG console - Starting WinSW in service mode. 2021-04-24T17:08:06.679 INFO console - Service 'Service Desktop : Info (desktopinfo)' was refreshed successfully. 2021-04-24T17:08:06.933 INFO service - Starting C:\services\DesktopInfo.exe 2021-04-24T17:08:07.750 INFO service - Started process DesktopInfo (2640). 2021-04-24T17:08:07.908 INFO service - Service started successfully. 才能获得我想要的东西。你知道问题出在哪里了吗?

0 个答案:

没有答案