Windows – loosing vnc control when i run an administrator task

administratorvncwindows 10

I'm using VNC for remote access and test for a small computer with Windows10.

Everything is working fine, expected when i run an application that require the administrator right.

When i run cmd.exe, it's ok. But if i run cmd.exe with administrator rights, the problem appear.

And when i run an exe with the small blue and yellow shield, (regedit, event viewer, visual studio installer, etc.), this is the same problem.

I keep the display (with refreshing), but mouse and keyboard have no effect on the remote computer. And when i close the cmd.exe (or other offending software) with the local mouse, remote mouse and remote keyboard magically work again.

I have tried with different server (TightVNC & TigerVNC) and different clients (Screen Sharing, RealVNC & TigerVNC). My viewer is a running OSX.

No problem with RDP, i keep the control.

I don't think it's a bug, it's too specific and reproducible. Maybe a parameter from Windows 10?

Best Answer

It sounds like the VNC server is running in User Mode and can only interact with other processes running in the same (non-elevated) context as the logged on user. As a result, VNC cannot interact with any program that requires administrative rights, which includes the Secure Desktop that's shown when User Account Control prompts for permission to start an elevated process.

You can solve this by configuring your VNC server to run as an elevated process. This might be described in a setting as Run as a service or something similar.

You could also disable UAC on the VNC host computer and be sure to log on with an account that has administrative rights, but that's an insecure workaround that you should avoid at all costs.

Related Question