Because on the Windows server must start a software, provide extranet access to the intranet client software, but because each remote server will log off the current user, so the client software will automatically exit, then I can not support the external network system access.
Solution: Register the client program as a Windows service
1. To implement this feature, two gadgets "Instsrv.exe" and "Srvany.exe" provided by Microsoft are used. First download the two programs and then put in the same directory, I am directly on the D drive, and then enter the DOS command line below enter the following command to register the service:
D:\instsrv.exe Tjserver D:\srvany.exe//tjserver is the service name
This command is to register the Srvany.exe program as a system service.
2. Then go to the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services to find the service name Tjserver that you just registered, in Tjserver create a new entry with the name " Parameters ", click to select it and then in the right window, create a new string value named" Application "and set its value to the path of the program you want to run as the service, for example my path is" D:\\tools\\tjs.exe ". In particular, it is important to note that the program path must be written in the same way as the previous example, is also the middle is separated by double slash, or the service can not automatically start.
You can then set up a appdirectory to specify the initial directory in which the program will run (optional).
If you need to make your registered service look more professional and better understand, you can continue to create a new string value named "Description", in which you can enter the description of the service you want to display.
3. It is also important to note that if you are going to run the program as a service is required after the interface, we can find the management tool in the Control Panel and then open the service or directly run the "services.msc" command to open the service, find the service just created right-click on the property, Select the Login tab, log in as check the Local System account and check the Allow service to interact with desktop last point OK, so your service can see the interface after booting.
4. Delete a registered service
Stop the service first and then use the command "D:\instsrv.exe tjserver remove" to delete the service
Online there is a function and instsrv.exe the same interface operation of the program, the name of "Srvinstw.exe", just a few points mouse can complete the first step above, the detailed use of the method will not say, very simple.
How to register the application EXE as a Windows service