Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Tutorial (UPDATED)-Installing repeater as a service

Post Reply
visionlogic
Posts: 1
Joined: 2004-05-21 01:51

Tutorial (UPDATED)-Installing repeater as a service

Post by visionlogic »

I have used the following method successfully for installing the repeater as a Windows service. Perhaps it will be of help to some of you.

~Visionlogic~

UPDATE 1 - The original procedure outlined below uses command prompt instructions. Those who prefer a GUI interface should see the NOTE at the bottom of the tutorial.
UPDATE 2 - One must be logged on with Administrator privileges in order to use these procedures.

Running vnc_repeater.exe as a Service on MS Windows

"Srvany.exe" is a program included in the Microsoft Windows NT Resource Kit (but may also be used on Windows 2000, XP, and Server 2003) which allows you to run almost any program as a Service. Services are programs that run behind the curtains of your system regardless of whether you log off, or never log in at all. "Srvany.exe" acts as a "wrapper" for the actual application you wish to run (such as vnc_repeater.exe). See instructions following.

Using SRVANY to run as a Service

To install vnc_repeater.exe as a Windows Service using Srvany and Instsrv, follow the steps below:

1. Obtain the Srvany.exe and Instsrv.exe programs from the Windows NT Resource Kit, or download from any of several sites on the net (Google for it). Alternatively, you can download Srvany.exe from Microsoft at the following location, but note that it is a self-extracting archive, so you need to run it to obtain the real Srvany.exe and Instsrv.exe files.

ftp://ftp.microsoft.com/bussys/winnt/wi ... ny_x86.exe

2. For this example, we will assume your vnc_repeater.exe is located at "C:\Program Files\UltraVNC\vnc_repeater.exe". However, there is no problem with having yours in a completely different location. Simply replace the applicable locations we use in this tutorial with wherever your repeater is located.

3. Place a copy of both "Srvany.exe" and "Instsrv.exe" into your UltraVNC folder ("C:\Program Files\UltraVNC\"). It is also valid to place these executables into your Windows folder, but for simplicity purposes, we are going to both assume and suggest you simply place them into the same folder as your vnc_repeater.exe.

4. Open a command prompt (click the Start menu, choose Programs, then Accessories, then MS-DOS Prompt. OR Start menu, choose Run, type "command" (or “cmd” on W2K or XP machines), and click OK). In the command prompt window, type these commands INCLUDING the quotes:

cd "C:\Program Files\UltraVNC\"
(But replace the location with the actual location of your UltraVNC folder.)
instsrv VNCRepeater "C:\Program Files\UltraVNC\srvany.exe"
(But replace "C:\Program Files\UltraVNC\srvany.exe" with the actual location of your srvany.exe)

5. Run regedit.exe (click the Start Menu, choose Run, then type "regedit", and click OK) and browse to:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\VNCRepeater
This "Key" (as it is called in the registry) was created by Instsrv when you executed that previous command; This is what Instsrv does for us. Without it, we would have had to create all of these Keys and Values ourselves.

WARNING: Using RegEdit incorrectly can cause serious problems that may require you to reinstall your operating system. Use it at your own risk.

6. Second-click on the "VNCRepeater" key and click New -> Key. This will create a new sub-key under that key; Name it "Parameters" (without quotes).

7. Second-click on the "Parameters" key and click New -> String Value. This will create a new "Value" inside of that key; Name it "Application" (without quotes).

8. Double-click the Value for "Application" and enter the location of your vnc_repeater.exe -- for our tutorial we will enter "C:\Program Files\UltraVNC\vnc_repeater.exe" (without quotes).

9. If you are going to use a repeater port other than the default then you must create another Value under the Parameters key in order to pass this port value to the repeater. In order to do this second-click on the "Parameters" key and click New -> String Value. This will create a new "Value" inside of that key - name it "AppParameters” (without quotes). After creating this “AppParameters” value double-click on it and enter the port number you will be using.

10. Now, open your Services control panel (located in the Administrative Tools folder) and look for your newly created VNCRepeater service. Each individual service can be set to start up in a different manner. Second-click on the new service and click on "Properties" and you will see a dropdown list labeled "Startup Type" amongst other things. The 3 different settings are:

Automatic -- The service will start automatically whenever the computer boots up regardless of whether anyone logs into the computer.
Manual -- The service will NOT start automatically. Any Administrator may start the service from this control panel, and it will remain running even after they log off, but will not start automatically.
Disabled -- The service will NOT start automatically and may NEVER start, that is, unless someone changes this setting back to one of the other two.

11. You may now close the properties window, and unless you set your service to "Disabled" (which would be silly) you may now second-click on it and click "Start".

12. You can now log off and/or reboot and attempt to connect to your vnc_repeater from another computer, and it should work.

Due to a restriction enforced by Windows on services, the program can either be interactive (have a Console, read keyboard input etc) or have network access (but not both at the same time). If your vnc_repeater service does not allow you connectivity after a reboot check the following: Open your Services control panel, second-click on your VNCRepeater service and click on properties. Click on the "Log On" tab up top. Make sure the "Allow service to interact with desktop" checkbox is NOT checked.

NOTE - For those of you who prefer a GUI interface over the command line - a GUI interface exists in the form of SrvInstw.exe. I've found a zip file containing SrvInstw.exe, Srvany.exe, and Instsrv.exe that can be downloaded here:
http://www.vbrad.com/source/dl_srvany.zip

To use the GUI interface just substitute the following for intructions numbered 3 and 4 above:

1. Extract SrvInstw.exe, Srvany.exe, and Instsrv.exe into your UltraVNC folder.
2. Click and run SrvInstw.exe
3. The GUI will open. Check Install Service radio box, click Next
4. Check Local Machine radio box, click Next
5. Enter the name for your service (VNCRepeater), click Next
6. Click Browse and select srvany.exe (which is in the same folder as SrvInstw.exe, remember?), then click Next
7. Click Service is its own Process radio box, click Next
8. Select what user account you want this service to run under. Normally the services run under System Account.
DO NOT check the Allow Service to Interact with Desktop checkbox.
9. Select the startup option, click Next
10. Click Finish.
11. Continue with steps 5 through 12 outlined above to properly edit the Registry keys.
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Post by redge »

repeater can be started from factory as service ! ;-)

your step by step is good for application cannot be started from factory as service. :)
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
Ares
Former moderator
Former moderator
Posts: 183
Joined: 2005-03-16 18:42

Repeater as a service

Post by Ares »

[topic=2446][/topic]


-Ares
Post Reply