Friday, March 22, 2013

Remote Install of RealVNC


I'm a little pleased with myself right now! Ever wanted to take control of a remote computer, and the user at the other end is in desperate need of help? Well thanks to this page I managed to write a small batch file that would install RealVNC together with a password and start the service allowing you to use the RealVNC viewer on that remote computer.

The link above talks about version 3.37 of RealVNC - at the time of writing, RealVNC is on version 4.13 - the main differences to the above link is the directory structure.

Here's the batch file that I created - created form the link above and modified to the 4.13 version of RealVNC.

<begin batch file>

REM Connect to IPC share
NET USE \\%1\IPC$ /user:administrator
REM Copy VNC Software
xcopy "C:\Program Files\RealVNC\*.*" "\\%1\C$\Program Files\RealVNC\*.*" /r/i/c/h/k/e
REM Copy registry settings
regedit /e "\\%1\C$\vncdmp.txt" "HKEY_LOCAL_MACHINE\Software\RealVNC"
REM - Install registry remotely
psexec \\%1 -s -i -d %windir%\regedit /s C:\vncdmp.txt
REM install the remote service
psexec \\%1 -s -i -d "C:\Program Files\RealVNC\VNC4\winvnc4.exe" -register
REM start the service
psexec \\%1 -s -i -d net start "VNC Server Version 4"

<end batch file>

You will notice the %1 variable - this is to allow you to specify and IP address or computer name at the command prompt. For example - if you saved your batch file as installvnc.bat and you want to install the software on a computer with the IP address of 192.168.0.20 - at the command prompt enter:

installvnc 192.168.0.20

You will also see from the batch file that it logs in as administrator on the remote computer - you must be able to supply the password for this account otherwise it will not work!

Here are the links for all this to work:

RealVNC

The original author's guide 

The PsExec tool

2 comments:

  1. This has already been done. Many server class boards already have this. Every maker has their own brand name but my tyan board calls it iKVM. It's it own subsystem and uses an AST1050. It shares one of the 4 vpn LAN ports with the OS seamlessly and independently. It allows for console control. Virtual DVD drives. Remote USB, DVD, and floppy pass through. And combined with ipmi, you'll get sensor readings and power control. Every major server motherboard has had this functionality for a long long time.

    ReplyDelete
  2. An excellent guide for not experienced users. I love when companies take care of their consumers in all their manifestations. Just recently I found an interesting software for remote access https://yumdownload.com/realvnc. The resource is useful and convenient, especially when it comes to downloading more than three programs for PCs.

    ReplyDelete