Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- SETLOCAL EnableExtensions
- set EXE=googledrivesync.exe
- :FORLOOP
- FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% goto FOUND
- echo Not running
- timeout /t 2
- START C:\"Program Files"\Google\Drive\googledrivesync.exe
- goto FIN
- :FOUND
- echo found GDrive running
- taskkill /F /IM "googledrivesync.exe"
- goto FORLOOP
- :FIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement