Батник

Discussion in 'С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby' started by mff, 17 Jul 2012.

  1. mff

    mff Elder - Старейшина

    Joined:
    12 Mar 2008
    Messages:
    2,076
    Likes Received:
    701
    Reputations:
    227
    Ребят помогите написать простой .bat файл.
    Нужно чтобы он закрывал программу с:\prog.exe и через 2 секунды его же открывал.
    Спасибо.
     
  2. |qbz|

    |qbz| Banned

    Joined:
    25 Dec 2009
    Messages:
    388
    Likes Received:
    169
    Reputations:
    65
    Code:
    taskkill /f /im prog.exe
    ping 1.1.1.1 -n 1 -w 2000 > nul
    с:\prog.exe
    или

    Code:
    taskkill /f /im prog.exe
    ping 1.1.1.1 -n 1 -w 2000 > nul
    start с:\prog.exe
     
    2 people like this.
  3. cyberXndr

    cyberXndr Member

    Joined:
    8 Jul 2012
    Messages:
    21
    Likes Received:
    5
    Reputations:
    6
    Code:
    taskkill /f /im prog.exe
    ping -n 2 127.0.0.1 >nul
    c:\prog.exe
    
     
Loading...