How to install VNC version 3.3.7 on a remote PC
Introduction:VNC is a free utility to remotely control another PC, see http://www.realvnc.com for details.
This article assumes that:
Step 1: Install VNC locally and set the password.Download Real VNC and install it on a local PC (for this article, version 3.3.7 was used).
During the installation process, make sure that you check both:
At the end of the installation process, you will be prompted to set a password.
The password that you set here will later be used to connect the remote PC.
If for some reason you aren't prompted for the password, run the following from the command line:
"C:\Program Files\RealVNC\WinVNC\winvnc.exe" -defaultsettings
Also run net start from the command line and confirm VNC Server is running as a service
Step 2: Configure VNC on the remote PC using PsExecPsExec is a freeware tool to execute processes on a remote PC and is needed for this procedure:
If you don't include the password in plain text, you will be prompted to supply the password (which will not be displayed as plain text).
NET USE \\RemotePC\IPC$ /user:administrator password
xcopy "C:\Program Files\RealVNC\*.*" "\\RemotePC\C$\Program Files\RealVNC\*.*" /r/i/c/h/k/e
Note: If you prefer you can export the file locally and then copy it.
regedit /e "\\RemotePC\C$\vncdmp.txt" "HKEY_LOCAL_MACHINE\Software\ORL"
psexec \\RemotePC -s -i -d %windir%\regedit /s C:\vncdmp.txt
Make sure to use the /s switch with regedit so that confirmation isn't required on the remote PC.
You are using regedit on the remote PC to perform this command. If the path for regedit is different on the remote PC, use the exact path instead of %windir% (local, not remote environmental variable).
Example: If the local PC is running XP Pro and the remote PC is Windows 2000, use this command:
psexec \\RemotePC -s -i -d C:\Winnt\regedit /s C:\vncdmp.txt
psexec \\RemotePC -s -i -d "C:\Program Files\RealVNC\WinVNC\winvnc.exe" -install
psexec \\RemotePC -s -i -d net start "VNC Server"
You should now be able to use VNC to control the remote PC.
Making VNC more secure using SSH
I want to thank Jau-Ling Chou for his input on using PsExec to install VNC on a remote PC.
Along with the use of PsExec, the biggest change to this article is that VNC version 3.3.7 from RealVNC was used instead of version 3.3.3 from AT&T Laboratories at Cambridge. Since the files are installed to different locations, the command lines have also changed.
To view the older method of installing VNC on a remote PC that does not use PsExec, click here.
Although remotely installing the VNC service does configure most of the registry settings, you still need to export / import your local HKLM settings so that a VNC password will be set on the remote PC.
When you install VNC locally and when you install the service remotely, a WinVNC registry entry is created under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. This runs VNC as an application. Since VNC is already running as a service, in my opinion this is redundant and I delete that entry.
If you have problems using PsExec, check the website for command line options. Since the -s -i -d combination worked for me, I didn't try other options. You shouldn't need to specify the user or password that PsExec uses, you are already connected to the remote PC's IPC$ share as an administrator.
02/02/07: Updated some of the URLs.
03/14/05: Added notes in step 4, must use correct path for regedit when local and remote paths differ
11/09/04: Corrected syntax typo in step 4, changed %\windir%\regedit to %windir%\regedit
If you have any suggestions or comments, please send them to firstname.lastname@example.org