Advertisement
Guest User

bat close

a guest
Nov 29th, 2012
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. @echo off
  2. :start
  3. tasklist /nh /fi "imagename eq notepad.exe" | find /i "notepad.exe" >nul && (
  4. Set Task=r
  5. ) || (
  6. set Task=nr
  7. )
  8. if /I %Task% EQU r goto Start
  9. if /I %Task% EQU nr goto Close
  10. :close
  11. shutdown -r -t 60
  12. pause>nul
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement