Browse > Home / geek / Installing VNC on a Remote PC

| Subcribe RSS Twitter Twitter

Installing VNC on a Remote PC

November 15th, 2005 Posted in geek

Below is a very handy guide from Terry for installing VNC onto a remote PC, using a few common and brilliant tools. I’ve slightly modified it for use with UltraVNC, plus a tweak or too.

Installing VNC on a Remote PC


How to install UltraVNC on a remote PC

Introduction:

VNC is a free utility to remotely control another PC, see http://www.utlravnc.com for details.

This article assumes that:

  1. The remote PC is running Windows 2000, 2003, NT4 or XP Pro

    (XP Home does not have an IPC$ share as far as I know).
  2. You have administrative rights to the remote PC.

This article also focuses on loading VNC on a remote PC as a service, not as an application.


Step 1: Install VNC locally and set the password.

Download ultraVNC and install it on a local PC.

During the installation process, make sure that you check both:

  1. Register VNC Server as a system service
  2. Start the VNC system service
  3. Configure AdminProperties

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\UltraVNC\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 PsExec

PsExec is a freeware tool to execute processes on a remote PC and is needed for this procedure:

http://www.sysinternals.com/ntw2k/freeware/psexec.shtml

  • The remote account that you use must be a member of the Administrators group on the remote PC.
  • “\\RemotePC” mentioned below can be either the remote PC’s name or IP address.
    1. Login to the remote PC’s IPC$ share with an administrator account.
    2. 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

    3. Copy your local VNC files to the remote PC.
    4. xcopy "C:\Program Files\UltraVNC\*.*" "\\RemotePC\C$\Program Files\UltraVNC\*.*" /r/i/c/h/k/e

    5. Use Regedit to export the local VNC registry settings to the remote PC.
    6. Note: If you prefer you can export the file locally and then copy it.

      regedit /e “\\RemotePC\C$\vncdmp.reg” “HKEY_LOCAL_MACHINE\Software\ORL”

    7. Use PsExec to import the above registry file on the remote PC.
    8. psexec \\RemotePC -s -i -d regedit.exe /s C:\vncdmp.reg

      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.

    9. Use PsExec to install the remote winvnc service.
    10. psexec \\RemotePC -s -i -d “C:\Program Files\UltraVNC\winvnc.exe” -install

    11. Use PsExec to start the remote “VNC Server” service.
    12. psexec \\RemotePC -s -i -d net start “VNC Server”

    You should now be able to use VNC to control the remote PC.


    Notes:

    Also see – 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.

    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 webadmin@tburke.net

    • Alex Karabasoff
      Great site and excellent resource you have. I think it's very cool. I will visit your website again. Thank you!
    blog comments powered by Disqus