windowsnerd.com

notes from an admin for himself. you can read it if you want.

Entries Comments


Custom Search






Hamachi start on boot

5 February, 2008 (19:21) | How to, VPN

One of the problems with the free version of Hamachi is that it won’t start when windows does. Hamachi can be an awesome admin back door to all your computers. There are a few ways to make Hamachi start as a service in Windows. First I’ll start with something that has the same effect- Start a program when Windows boots using task scheduler. You won’t have to log in or nothin’ tex! It will just go behind the scenes service style. Also note that the hamachi interface will not pop up. The target audience here is people who already have their Hamachi client configured and want it to start at boot. The quick version of this is: task scheduler>on boot>start hamachi. But here is the detailed walkthrough:

Vista Task scheduler method-

Step one- install Hamachi from http://www.hamachi.cc configure it for the Hamachi network you use BEFORE continuing. The next steps create a task which runs on boot and starts Hamachi whether you log in or not. It has the same end result as running Hamachi as a service for me.

Vista Task scheduler method-

Step one- install Hamachi from http://www.hamachi.cc configure it for the Hamachi network you use BEFORE continuing. The next steps create a task which runs on boot and starts Hamachi whether you log in or not. It has the same end result as running Hamachi as a service for me.

 

– start>run>task scheduler

– On the right side click “Create a task”

– General Tab – Name- call it Hamachi

– Description – This task launches Hamachi when windows starts up.

– User> use your own account for now. Go back and change it later.

– Choose “Run whether user is logged on or not”

– Select Run with highest privileges

– I selected hidden and configure Windows vista

– Triggers tab- new

– begin the task at startup

– optional (I have better luck “delaying start” by 1min. Be sure to wait 1 min to test if you do this)

– Leave the rest default- no repeat, stop, activate, expire BUT check enabled. and OK

– Actions- new

– action should already be “start a program”

– Settings>Program/script: Browse to your Hamachi.. ie c:\program files\Hamachi\hamachi.exe

– No “arguments” or “start in” and hit ok.

– Conditions-

– turn off stop if the computer switches to battery power if you have this on a users laptop

– Settings – should be ok. hit ok

– Box should come up for the username/password. It probably isn’t going to work if you don’t cache this. 🙂

Now to check your work and troubleshoot –

In the task scheduler window the left pane contains: Task scheduler library click that

Right click on your Hamachi task and hit run

In the bottom section when you have the Hamachi task selected is a tab called history. Click that

In the history tab there will be several entries to help troubleshoot. Task triggered, engine received…, task started, action started, created task process, action completed and task completed. I had a problem with user accounts and this helped me figure it out.

Now delete Hamachi from your startup folder in start>program files>startup and reboot.

Once you reboot, log in, and check the task manager for hamachi.exe. If it is running you should be able to see the test machine on another computer in the Hamachi network. Viola! Now you have an encrypted awesome connection that traverses multiple NATs, bypasses most firewalls and best of all isn’t transparent to your average dumb user. When you launch this from task scheduler you won’t be able to see the UI. Next I’ll write the instructions for doing this with SC so that it starts as a service. I’ll also create a doc for running a Hyperic agent in the same manner.

Any comments? If you used this please let me know so I continue to post instead of assuming this stuff stagnates forever. Also if you would like a powershell lesson, I can show you how to do this completely in the command line. I can also do a step by step screenshot version or use some macromedia magic to create a video version. Let me know in the comments please.

Vista install as a service-

Use sc from Microsoft.com to create a service Coming soon

Security concerns –

Hamachi when allowing all types of traffic can be a devastating back door to all of your computers if one gets haxored. I have an ipsec based traffic filter installed on all my servers which are the main common threads. Hamachi groups are in groups of 5. Worst case an infected machine takes out 5 machines that are open to each other. If there is demand I’ll show you how to build amazing traffic rules using IPSec as a firewall of sorts. Only allow traffic on this port to this destination range of addresses etc.

 


«

  »

Comments

Comment from rp
Time: April 9, 2008, 10:48 am

Thanks 🙂 This was very helpful.

Only 1 change I made on the ‘Settings’ tab:
I unchecked “[ ] Stop the task if it runs longer than….”

Comment from CANDY LAIRD
Time: August 8, 2008, 5:01 am

can this be used on xp too? i tried to set it up using sheduled tasks on a xp pro machine. it only runs if a user is logged onto windows.

Comment from Nerd
Time: August 18, 2008, 10:39 am

I’m building an XP vm to test it out Candy

Pingback from TCG Tech Blog » Hamachi VPN server
Time: February 1, 2009, 9:23 pm

[…] Use Task Scheduler to set Hamachi to start when Windows starts. See MS article re Task Scheduler and Hamachi start on Boot reference […]

Comment from trade peru
Time: March 5, 2011, 6:50 pm

There are some fascinating points in time on this article however I don’t know if I see all of them heart to heart. There may be some validity but I’ll take hold opinion until I look into it further. Good article , thanks and we want extra! Added to FeedBurner as effectively

Write a comment