3

I have a Windows XP SP2 machine with Hamachi service running. Usually I connect to it using Remote Desktop, and when I disconnect I can't connect to it again because the Hamachi VPN is down. How to prevent the Hamachi service to stop?

I am sure that Hamachi is configured as an automatic service.

0

7 Answers 7

5

If Hamachi is configure to run as a service, then it should not matter whether you just disconnect from the RDP sesssion, or log off, as it should be running in the background. You should check the services MMC to see that the service is there, and that it is running.

10

Apparently the free version of Hamachi requires the GUI to be running in order to operate. When you disconnect your RDP session the free version of Hamachi will disconnect. The workaround appears to be to run the following command instead of disconnecting. (Note: Number 1 below is your session ID. To know what your current session ID, in the console, run query user or open the task manager and go to users and look at your session ID)

tscon 1 /dest:console

This may need to be run as administrator. This will transfer your session back to the local machine. Also note that when the session is transfered back to the local machine it will not be locked and will be available to anyone with physical access to the machine.

2
  • 4
    Very interesting. It looks like you are right: "So, in the hopes of converting more of you into paying customers, we’re making a small change to Hamachi: unless a computer is part of a paid network, you need to be logged in and running the Hamachi UI on your desktop in order to allow it to function. If no user is logged on to the computer then – even though the Hamachi service or daemon is active in the background – it will not go online in any networks that it may belong to. We believe this a fair change..." b.logme.in/2012/11/07/changes-to-hamachi-on-november-19th Aug 20, 2013 at 2:46
  • 1
    In order for this to work for me, I had to log into the console first by using mstsc /console /V:servername to acquire the console login. Then remoting to terminal services on the host and viewing my logins using query user. Then I switched to the console using tscon 0 /dest:console and was logged off, but the console stayed logged on. See Single Remote Desktop Session in Server 2003. Oct 16, 2014 at 7:55
4

Just add this in a .bat script:

tscon 1 /dest:console
rundll32.exe user32.dll, LockWorkStation

The first line transfers the remote session to the local desktop and the second line, locks it. Instead of disconnecting, just run the bat script.

1
  • This is the best answer.
    – lakam99
    Apr 28, 2021 at 20:51
2

If you close the remote desktop session without logging off it shouldn't be an issue. If your using the microsoft rdp client just click the "X" at the top bar of the screen.

The only other thing I could think of is maybe the hamachi client is set to auto-disconnect if idle for X minutes. I'm not even sure if hamachi has that option, I've never really looked.

3
  • I usually use the close(X) button
    – Jader Dias
    May 11, 2009 at 18:14
  • Hmmm the Hamachi shouldn't see a difference, the only thing that effectively happens when you close an rdp session that way is the computer locks. I would poke around the settings a bit. I don't have access to a Himachi client where I'm at. May 11, 2009 at 18:55
  • 1
    Have you tried logging to see what exactly is going on? Go into Hamachi Preferences > System > Enable Diagnostic Log. Logs are place in %APPDATA%\Hamachi (your Hamachi configuration folder) and are rotated when they reach 8MB. May 11, 2009 at 19:12
1

When I stopped to close the window through the X button, and started to Disconnect, then the problem not occurred again.

0

The batch script is a crude solution. The way I solved the problem is the following. I went into policy editor>Computer Conf.>Administrative Templates>Windows Components>Remote Desktop Services>Remote Connection Host>Connections>Restrict Desktop Remote services users to a single RDP session> Disabled the rule. After that you can go to the local machine(or use any remote software like TeamViewer) log in with your credentials> and start-up Hamachi> LOCK THE ACCOUNT so it will stay logged on. Now if you log in with RDP and go to task manager>users you will see that you two users logged in. After that, you can log in\log out with RDP how many times you want it will not log off the local session and thus Hamachi will stay on.

0

I briefly inspected the action Hamachi is doing. From what I found there, the Hamachi service (named Hamachi2SVC, running hamachi-2.exe) seemed to actively detect the Windows logoffs and ask their server what to do; in OP's case, the server instructs the client to disconnect.
To take around this mechanism, a way is to patch the program not to check for the logoffs. For Hamachi version 2.3.0.78, changing byte 0x10122E 0x85 to 0x31 (instruction test to xor) in C:\Program Files (x86)\LogMeIn Hamachi\x64\hamachi-2.exe works as expected, though not sure about other versions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .