Hamachi VPN Solution

 17 / January / 2006 by Riley

Hamachi is a great program that enables you to easily set up an encrypted private network between remote computers over the open internet. It’s a simple elegant solution without much fuss. It does have some limitations, but it’s definitely an easy and secure way to access your shared folders, enable remote network gaming, and control your machines via Remote Desktop or VNC type programs. The following tutorial will show you how to configure Hamachi to run and automatically connect in Windows 2000, XP, and 2003.


To install Hamachi, simply download and run the install file from the Hamachi website: http://hamachi.cc/download Version was the version I used for all of my testing. I recommend installing Hamachi in the default folder and not having it run automatically, especially if you would like to have it run as a service, like I describe below. After the installation you will need to reboot the computer.

After rebooting the machine start up Hamachi from the newly created shortcut. It will give you instructions to set up your account. Basically, you pick a nickname and it phones home to the Hamachi server to obtain your unique 5.X.X.X IP address. You might want to do this step at the same time on all your computers you plan to access with Hamachi. That way they will all get IP addresses close to one another. You then click “create new network” and enter a network name and password. I recommend using a site like https://www.grc.com/password to obtain a secure password.

Once you have installed Hamachi on all the computers you plan on using, you will need to click the button to “Join existing network” on all the other PCs. Enter your network name and password and click “Join”. Once it detects the the other computers it will place a green dot next to their entry in the list. You should then be able to access network shares and remote desktop or VNC into the computers. Use the assigned 5.X.X.X IP address to access each computer. One limitation of Hamachi is that you cannot currently use the program to securely surf the net from a remote location without using some kind of remote control app. Another program called OpenVPN is much better suited for that and other advanced routing tasks. I will cover OpenVPN in another article.

Running Hamachi as a Windows service:

I highly recommend running Hamachi as a Windows service. It takes a little more effort, but here’s how you do it.

You need two utilities – instsrv.exe and srvany.exe. Both can be found in the Windows Server Resource Kits. You can find the Windows 2003 Server Resource Kit here. But it is rather large and won’t install on Pre-XP Windows machines. So you might be better off doing a Google search for a site like this.

Once you have these utiltites, copy them into your Hamachi directory. (I’m going to assume that you used the default directory from here on out.)

Go to Start – Run – and type cmd to open the Command Prompt

Type these commands in order and hit enter after each:

cd C:\Program Files\Hamachi\
instsrv AutoHamachi “c:\program files\hamachi\srvany.exe”

This will add Hamachi as an available service in Windows.

Edit the Registry:

Then you need to edit the registry to run the service properly. Add one of the following entries according to your Windows version.

For Windows 2000:
(Win2000HamachiServiceConfig.reg – right-click, save, and run)

Application = c:\\program files\\hamachi\\hamachi.exe
AppDirectory = c:\\program files\\hamachi\\
AppParameters = -srvany

For Windows XP / 2003:
(WinXPHamachiServiceConfig.reg – right-click, save, and run)

Application = c:\\program files\\hamachi\\hamachi.exe -srvany


With the new version the above registry keys have an additional command to point the service to the correct profile. Instead of simply the -srvany you need to add a -config tag followed by the file path to it. By default the config file will have the path:

C:\Documents and Settings\_your_user_name_\Application Data\Hamachi

So for the new version you will have a string like this:

-srvany -config “C:\Documents and Settings\Administrator\Application Data\Hamachi”

Note: Don’t forget the quotes around the file path and replace “Administrator” with your username.

With the later version you can now skip ahead to the “Configure the service” section below.


Next you need to copy the user profile data you created during the installation from the current Windows user to the default system user in the registry. This needs to be done so that when Hamachi runs as a service it will have access to the info needed be able to connect to the virtual network you created. There is several ways to copy the necessary registry data from one area to another, but this is the only way that I have found that works on all versions of Windows.

Go to Start – Run – and type regedit and click OK to open up the regsistry editor.

Navigate to:

HKEY_CURRENT_USER\Software\Applied Networking

In the top menu go to File (or Registry in server version) – Export (or Export Registry File)

Give the file a name and then save it.

Open the file in a text editor like Notepad.

You need to edit the file to replace the two instances of:




Save the changed file as a .reg file and double-click it to apply the data to the registry. This effectively copies the Hamachi user profile from the original location in the regsitry to HKEY_USERS\.DEFAULT

Note: The copying of this data can also be done at the command prompt using the reg.exe program’s copy command, but it is not available on all versions of Windows.

Next you need to make sure this registry key is set to the value 1 so that Hamachi automatically connects on startup:
(HamachiAutoConnect.reg – right-click, save, and run)

HKEY_USERS\.DEFAULT\Software\Applied Networking\Hamachi
AutoConnect = 1

Configure the service:

Go to Start – Control Panel – Administrative Tools – Services

Right Click AutoHamachi – click Properties

Select “Log On” tab – check “Local System Account” and then under it check “Allow service to interact with the desktop”.

Go back to the “General” tab and for Startup Type select “Automatic”.

Reboot the machine and Hamachi should automatically start and connect. You should then be able to start up Hamachi on the the other computers and verify their connectivity.

To make it easier to access other computers on your network, add the 5.X.X.X IP addresses with their corresponding host names to the hosts files of all the PCs.

Note: If you do run into any errors or it just doesn’t work for you, make sure you double check the syntax of everything. Make sure Hamachi is not running during any of the stages of configuring it as a service. Also, check Hamachi’s settings to make sure it is not set to automatically start up when you login. Feel free to post a comment if you encounter any other issues with this process.

Other Hamachi links:

Here’s some links to info on using Hamachi on other operating systems and some other uses:

Running Hamachi as a service in Linux:

Hamachi on Mac OSX Beta info:

Running it automatically on Mac OSX:

Public networks list:

Gaming networks:

Philadelphia IT

         filed under: networking, windows



    […] read more | digg story […]


    […] Running Hamachi as a system service […]

    cowboy_k 01/23/06 @ 2:29pm

    Instead of instsrv and srvany, you could use Winserv – freeware, small, and doesn’t require registry hacking like srvany – just a thought.

    puRe 01/23/06 @ 2:49pm

    Instead of using instsrv, srvany or winserv you could just use the 1.0 Beta of Hamachi and use the built in “Run Hamachi as service” feature. But that would be to easy .. hm ?
    Read more in the Hamachi forums:


    […] read more | digg story […]


    […] Link to article […]


    […] Read Tutorial Hamachi VPN Solution Technorati Tags: internet networking security software Explore posts in the same categories: Software, Networking, Security, Internet […]


    […] It’s A Tech World » Hamachi VPN Solution (tags: vpn windows service) […]


    […] read more | digg story […]


    […] It’s A Tech World » Hamachi VPN Solution […]

    Kompressor 01/26/06 @ 7:01pm

    Worked great! Thanks!

    Avoura 06/16/06 @ 12:39pm

    I got as far as adding registry entries, in the UPDATE section of the article. Then it says to navigate to HKEY_CURRENT_USER\Software\Applied Networking
    But in my registry, I do not have this entry at all.
    So what do I do to continue?

    Riley 06/20/06 @ 3:08pm

    At the end of the update it says to skip ahead to the next section. You can ignore the part about the “Applied Networking” registry entry.

    hamachi.cz 08/10/06 @ 11:02pm

    So, here are Links for ALL Hamachi Players :

    English version for games: http://www.eng.Hamachi.cz
    Help Forum: http://www.forum.Hamachi.cz

    beck 08/15/06 @ 1:38pm

    I think it’s worth noting that Hamachi was just bought by Logmein, a company known for remote access software. I’m pumped about it; not only have they stated on the Hamachi forums that the program will remain free, but I have high expectations of what the Hamachi guys can do now with an actual budget


    […] , service   Share this post: email it! | bookmark it! | digg it! | live it! Published 23-12-2006 03:59 by Rex Filed under Useful Tools, Information Technology,Linux […]

    chris 03/28/07 @ 3:07pm

    You can eliminate the step:

    ‘Configure the service:’ where you specify that the service should “Allow service to interact with the desktop”.

    Just add the following to the registry file:


    This worked great for me with the XP .reg file.

    The default is [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AutoHamachi]
    “Type”=dword:00000010 which disables this setting.

    vpn service 06/05/08 @ 8:30am

    So, can you explaine why it’s a free for end users ?

    jijo.joseph 07/19/08 @ 1:09am

    I tried this and woking fine. But I found one problem. I have Windows XP installed on my pc. After switching to another user, I cannot come back. i.e The “Log off” option is not working and even “Shut Down” also.If I kill the “hamachi.exe” I can log off. I tried in my friend’s pc and I found the same problem there also. What could be the reason?