Make one of windows service process as user [exe4j]

huangapple go评论54阅读模式
英文:

Make one of windows service process as user [exe4j]

问题

在使用vncserver时,您可以选择安装运行
如果您选择安装,服务将被安装,并在启动服务后,会出现两个进程:一个是系统进程,另一个是用户进程。
如果您选择运行,则无需安装服务,两个进程都是用户进程。

现在我已经创建了一个Java程序,并使用exe4j将其转化为服务。
在安装和启动我的服务后,会出现两个进程,就像vnc一样,但两者都是系统进程。
是否有办法让其中一个变成用户进程?
我应该更改我的代码吗?

英文:

While you are working with vncserver, you can Install it or run.
If you Install it, the service would be installed and after starting the service, two processes would be appear: one is system and the other is process.
If you run it, the you don't need to install the service and both process are user.

Now I've made a java program and make it service with exe4j.
After installing and starting my service, two process would be appear like the vnc but both are system.
Is there any way to run one another on user?
Should I Change my code?

答案1

得分: 0

Windows服务默认在系统账户下运行。使用/install命令行参数时,无法指定不同的用户(不像使用install4j,其中“安装服务”操作允许您指定不同的用户)。

使用exe4j,您需要在服务属性对话框中手动更改用户。

英文:

Windows services run under a system account by default. With the /install command line parameter, there is no way to specify a different user (unlike with install4j where the "Install a service" action allows you to specify a different user).

With exe4j, you would have to change the user manually in the service properties dialog.

huangapple
  • 本文由 发表于 2023年7月6日 15:50:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/76626621.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定