Turning on UltraVNC server service on a Windows system

If you installed UltraVNC, which is free and open-source software, to provide Virtual Network Computing (VNC) connectivity from/to a system for remote administration capabilities, but haven't enabled the UltraVNC server service to allow the system itself to be managed remotely, you can enable that service by taking the following steps:

  1. Run the uvnc_settings.exe program, which you can find in the directory where you installed UltraVNC. You will need to provide the login credentials for an account with administrator-level access on the system.

    UltraVNC settings

  2. Click on the Service tab then click on the Install Service button, which will install the software as a service, i.e. as a function provided by a server, on the system.
    Udemy Generic Category (English)120x600

    UltraVNC service settings

  3. Once the service is installed, you can click on the Start Service button to run the service.

    UltraVNC start service

  4. You can set the password to be used for VNC connections by clicking on the Security tab. You can set two passwords. The "VNC Password" will allow remote control of the system whereas the "View-Only Password" will only allow viewing the display on the system, which is helpful if you want to show someone what is happening on the system without giving the person the ability to control the system.

    UltraVNC security settings

    You can then click on the OK button to close the UltraVNC settings window.

Once the service is installed, you will see uvnc_service appear in the Services list, which you can view by typing services.msc in the Cortana "Type here to search" field then selecting "Services Desktop app" which should appear as the best match. The status field for the service will be blank until you start the service. When you start the service, the status should be listed as "running."

Services - uvnc_service

The Startup Type value should be "Automatic", which indicates the service will automatically start running when the system is booted. If you double-click on the service, you will see the path to the executable program for the service on the system. The executsble will be started with winvnc.exe -service to run UltraVNC as a server service.

The Complete Wireshark Course: Go from Beginner to Advanced
The Complete Wireshark Course
Go from Beginner to Advanced
1x1 px

Services - uvnc_service details

If you right-click on "Services Desktop app" and select "Run as administrator, you can stop and start the service from the above window. Otherwise, if you are viewing the services from a regular user account without administrator privileges, the start and stop buttons will be grayed out. You can also stop and start the service from a command-line interface (CLI), i.e., a command prompt, if you open the command prompt window with administrator privileges.

Save on a Computer: Run Windows, Mac, and Linux with VirtualBox
Save on a Computer: Run Windows,
Mac, and Linux with VirtualBox
1x1 px

C:\WINDOWS\system32>net stop uvnc_service
The uvnc_service service is stopping..
The uvnc_service service was stopped successfully.


C:\WINDOWS\system32>net start uvnc_service
The uvnc_service service is starting.
The uvnc_service service was started successfully.


C:\WINDOWS\system32>

You can also see that the service is running and listening on the registered port for the VNC protocol, port 5900, from a command prompt opened from a regular user account with netstat -an | find "5900". If you include the -o option, you will also see the process identifier (PID) for the program that is listening on the port.

C:\Users\Lola>netstat -ano | find "5900"
  TCP    0.0.0.0:5900           0.0.0.0:0              LISTENING       5400

C:\Users\Lola>

The PID for the process listening on port 5900 in the example output above is 5400, so I can then use the tasklist command with a filter to display information only on the process with PID equal to 5400.

C:\Users\Lola>tasklist /fi "pid eq 5400"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
winvnc.exe                    5400 Console                    1     10,448 K

C:\Users\Lola>

When you enable the service, the Windows Firewall is automatically configured to allow the incoming VNC connections. You can find the firewall rule information in the Windows Registry at HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules\{147FEADB-CEE4-442D-89B2-016DC6F3663F}. You can see that information from a command prompt with a reg query command like the one below.

C:\Users\Lola>reg query HKLM\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules /v {147FEADB-CEE4-442D-89B2-016DC6F3663F}

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules
    {147FEADB-CEE4-442D-89B2-016DC6F3663F}    REG_SZ    v2.26|Action=Allow|Active=TRUE|Dir=In|Protocol=6|Profile=Domain|LPort=5900|Name=vnc5900|


C:\Users\Lola>

You can also use a netsh command to view details on the firewall rule that allows incoming connections to the VNC server as shown below.

C:\Users\Lola>netsh advfirewall firewall show rule name=winvnc.exe dir=in

Rule Name:                            winvnc.exe
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain
Grouping:
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             TCP
LocalPort:                            Any
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow

Rule Name:                            winvnc.exe
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain
Grouping:
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             UDP
LocalPort:                            Any
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow
Ok.


C:\Users\Lola>

Related articles:

  1. UltraVNC not responding to connection attempts
  2. Allowing UltraVNC server connectivity through BullGuard Firewall
  3. Checking and changing the Windows Firewall settings on a Windows 7 system
  4. Installing an encryption plugin for UltraVNC
  5. VNC authentication/connection rejected error message