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:
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.
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."
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.
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.
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: