I have pre-packaged the VNC server (TightVNC) files plus scripts needed to set up the server.
- Download for 32-bit boot image: winpe_vnc_files_x86.zip
- Download for 64-bit boot image: winpe_vnc_files_x64.zip
- Download the correct zip file for the boot image architecture (above).
- Unzip the files to a temporary directory.
- Mount the WIM image with
dism
. - Move the
deploy
andVNC
directories into the image root. - Delete
setup.exe
in the root of the image. - Move the
startnet.cmd
file to\Windows\System32
, overriding the existing file. - Unmount the image and all finished.
-
Mount WIM image with
dism
(if extracted from aboot.wim
, it will be index:2). -
Create two new directories:
\deploy
and\VNC
. -
Move
\setup.exe
to\deploy\setup.exe
. -
Download TightVNC 32 or 64-bit (architecture is important!!).
-
Install TightVNC on reference computer and configure the Service mode.
-
Export
HKLM\SOFTWARE\TightVNC to
\VNC\config32.reg` -
(64-bit only) Export
HKLM\SOFTWARE\Wow6432Node\TightVNC
to\VNC\config64.reg
-
Copy the following files from the TightVNC install folder to
\VNC
:- tvnserver.exe
- screenhooks32.dll (64-bit only):
- hookldr.exe
- screenhooks64.dll
-
Edit
\Windows\System32\startnet.cmd
and append the following line:\deploy\preinit.cmd
-
Create
\deploy\preinit.cmd
as follows (delete theconfig64.reg
line if using a 32-bit image):@echo off wpeutil InitializeNetwork wpeutil DisableFirewall cd \VNC regedit /s config32.reg regedit /s config64.reg tvnserver -install -silent tvnserver -start cd \deploy copy setup.exe ..\ cd ..\ start setup.exe
-
Commit and unmount the image
-
Upload to WDS and voila
dism /Mount-Image /ImageFile:<SRC> /index:2 /MountDir:<MOUNT_POINT>
dism /Unmount-Image /MountDir:<MOUNT_POINT> /commit
dism /Export-Image /SourceImageFile:<SRC> /DestinationImageFile:<NEW_FILE> /Compress:max /SourceIndex:2
dism /Get-ImageInfo /ImageFile:<SRC>
Note the image index will always be :2. Don't attempt to mount/edit index:1 as it does not contain the setup bootstrapper that is run on PXE boot.
Exporting the image will recompress it slightly and yield a smaller file.
Please note TightVNC is licensed under the GPL.