Jump to content
TorGuard
Taurean

Batch Script to Launch VPN and BT Clients

Rate this topic

Recommended Posts

Taurean

Save the following as a .bat file...

@ECHO OFF

COLOR 1F

SETLOCAL

REM Program paths and filenames:
REM ---------------------------------EDIT---------------------------------------
SET "VPNPATH=C:\Program Files (x86)\VPNetwork LLC\TorGuard"
SET "VPNFILE=TorGuardDesktopQt.exe"
SET "CLIENTPATH=C:\Program Files\BiglyBT"
SET "CLIENTFILE=BiglyBT.exe"
REM -------------------------------END EDIT-------------------------------------

ECHO VPN and BT launcher 
ECHO ---------------------

TASKLIST /FI "IMAGENAME EQ %VPNFILE%" 2>NUL | FIND /I /N "%VPNFILE%">NUL

IF "%ERRORLEVEL%"=="1" (
	TIMEOUT /T 10 /NOBREAK
	ECHO.
	ECHO Starting %VPNFILE%
	START "VPN" /B "%VPNPATH%\%VPNFILE%"
	TIMEOUT /T 30
	ECHO.
)

TASKLIST /FI "IMAGENAME EQ %CLIENTFILE%" 2>NUL | FIND /I /N "%CLIENTFILE%">NUL

IF "%ERRORLEVEL%"=="1" (
	ECHO Starting %CLIENTFILE%
	TIMEOUT /T 10 /NOBREAK
	START "BT" /B "%CLIENTPATH%\%CLIENTFILE%"
	ECHO.
)

ECHO DONE!
TIMEOUT /T 5

ENDLOCAL
EXIT

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...