Wednesday, 29 January 2014

Connection Test Tracert Batch File

One of our home workers complained that her connection to RDS is always dropping.

Incidentally, I connected to her PC via Team Viewer and also had dropped connections too.

Team Viewer and RDS connect differently. I'm quite sure RDS uses higher range ports (3389?), it is also SSL. Team Viewer I am not sure but it may be port 80.

This all leads me to believe it has something to do with her ISP. Her ISP, of course, deny this.

I decided to modify the earlier ping test batch file. For one, our RDS gateway won't return a ping which is a good thing. However, it is possible to do a tracert to it so I've created a batch file that will first create then append to a file the current date and time and then add the results of the tracert command.

The idea is that she double clicks this file whenever she gets a connection problem, in order to help create a log of the state of her connection between us and her at the time.

Here's the code. If you're not aware, just copy and paste it into a text file then rename the text file to have extension ".bat" - I wish I could show you some sample output but I'm in Linux so that bat file won't work!


  1. @echo off
  2. echo --- >> c:\docume~1\j.smith\desktop\tracelogs.txt
  3. echo --- >> c:\docume~1\j.smith\desktop\tracelogs.txt
  4. echo %date% >> c:\docume~1\j.smith\desktop\tracelogs.txt
  5. echo %time% >> c:\docume~1\j.smith\desktop\tracelogs.txt
  6. echo Running connection test
  7. echo This window will disappear when the test is complete
  8. echo Don't do anything else in the meantime
  9. tracert >> c:\docume~1\j.smith\desktop\tracelogs.txt
  10. echo --- >> c:\docume~1\j.smith\desktop\tracelogs.txt
  11. echo --- >> c:\docume~1\j.smith\desktop\tracelogs.txt
  12. ------------------------------------------------

Replace "j.smith" with the user's AD username. I chose the desktop as the location because the user can create documents there, unlike the rest of the machine which is logged down (she is not a local administrator). Replace with the site of your choice.

You can also loop this continuously, there's a few ways to do that, but on some older machines it may cause the fan to kick into overdrive!

No comments:

Post a Comment

Popular Posts