Frpc registered as windows service, you can start when the user is not logged in

Description:

Configuring startup items in Windows only run when the user logs on. Before Logon To start you need to configure it as a "service."

Summary:

Introduced before frp how to use port forwarding and custom second-level domain, to facilitate unified management and monitoring company.
But in the actual production process, developers find frpc window for the application window, prone to misuse and close the application window, in order to solve this problem, we recommend frpc registered as a windows service, easy to use.

This method uses nssm (stable version) tool .EXE file is registered as a Windows service

1. Download and extracting archive system using cmd enter the corresponding version of the tool path. (Please use the Run as Administrator cmd)

After using cmd into the tool path can type nssm viewing tools use parameters, or double-click to view the tool parameter.

2. Type in cmd command, enter the service to edit the page:

nssm install serviceName

3. Set the service path address

Click Path as shown below, to select the path where the need to register to use the service. Starup directory will be generated automatically.

Note: Arguments parameters shown in the figure, do not set otherwise it will cause a service open to fail.

4. Set details details

Set the description of the service

5. Set the log on

Check the Allow service to interact with desktop option

5. Set I / O tab

Create a log file in output folder frpc, and select.

Other options card information using the default settings.


nssm commonly used commands

nssm install serviceName # installation services 
nssm edit serviceName # using the GUI editor installed services 
nssm restart serviceName # restart the service 
nssm remove serviceName # remove the installed services

Thank bloggers share:

https://aikiller.github.io/2018/03/14/%E5%B0%86frpc%E6%B3%A8%E5%86%8C%E4%B8%BAwindows%E6%9C%8D%E5%8A%A1/

Guess you like

Origin www.cnblogs.com/mobaids/p/11567899.html