2

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.

David Pashley
  • 23,151
  • 2
  • 41
  • 71
Jader Dias
  • 4,625
  • 18
  • 48
  • 50

6 Answers6

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.

masegaloeh
  • 17,978
  • 9
  • 56
  • 104
Keith
  • 201
  • 2
  • 3
  • 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...*" http://b.logme.in/2012/11/07/changes-to-hamachi-on-november-19th/ – Austin ''Danger'' Powers Aug 20 '13 at 02: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](http://stackoverflow.com/a/328433/1020470). – Mark Mikofski Oct 16 '14 at 07:55
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.

Sam Cogan
  • 38,158
  • 6
  • 77
  • 113
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.

Vince
  • 41
  • 1
1

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

Jader Dias
  • 4,625
  • 18
  • 48
  • 50
1

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.

TrueDuality
  • 1,844
  • 5
  • 27
  • 37
  • I usually use the close(X) button – Jader Dias May 11 '09 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. – TrueDuality May 11 '09 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. – TrueDuality May 11 '09 at 19:12
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.