Skip to content

Instantly share code, notes, and snippets.

@netomx
Created October 31, 2018 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netomx/42b3c5e063f01ce440a43446671895b2 to your computer and use it in GitHub Desktop.
Save netomx/42b3c5e063f01ce440a43446671895b2 to your computer and use it in GitHub Desktop.
Small batch for waiting on Veracrypt to mount a drive to open ownCloud.
echo off
cls
echo Waiting on VeraCrypt...
:no
PING localhost -n 2 > NUL
IF EXIST Y:\ (GOTO yes) ELSE (GOTO no)
:yes
tasklist /FI "IMAGENAME eq owncloud.exe" 2>NUL | find /I /N "owncloud.exe" >NUL
if "%ERRORLEVEL%"=="0" (echo ownCloud is already being executed) ELSE start "ownCloud" "c:\Program Files (x86)\ownCloud\owncloud.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment