Batch file to turn both MJ & TJNet echo canceller on/off

magicJack Tips and Tricks

Moderators: Bill Smith, Pilot

Post Reply
sbw07
MagicJack Contributor
Posts: 74
Joined: Tue Jan 01, 2008 4:19 pm

Batch file to turn both MJ & TJNet echo canceller on/off

Post by sbw07 »

Here's a batch file that I wrote to turn MJ and the line echo canellation utilty from TJNet on and off at the same time

Code: Select all

@echo off
tasklist | FIND /I "TjLec.exe"
IF ERRORLEVEL 1 (
    START "TJ" "C:\Program Files\TJNet Lec\TjLec.exe"
    START "MJ" "C:\Users\YOURUSERNAME\AppData\Roaming\mjusbsp\magicJack.exe" /foreground /scf _magicJackPersonalDataRoot "I:\magicJack"
) ELSE (
    taskkill /IM magicjack.exe
    taskkill /IM TjLec.exe
)
This was written for Vista. For XP you'll have to change \Users\YOURUSERNAME\AppData\Roaming\ to \Documents and Settings\YOURUSERNAME\Application Data\ & change taskkill /im to tskill

Copy/paste into notepad (replacing YOURUSERNAME with whatever that may be) and save as anything.bat

Note that in order to kill the TJNet util in Vista,this batch file must be run as an administrator. the easiest way to do this is to create a desktop shortcut to the file open it's properties,click "advanced" on the shortcut tab and check off run as administrator. If you have UAC fully enabled this might not be worth your while.
You can also set it to run minimized (on the General tab) so you won't be bothered by the command window always popping up.
And lastly, you can replace the default icon with the MJ icon by clicking "change icon" "browse" and navigating to magicjack.exe
Image mj on Vista Home Premium SP1
Post Reply