how to run a batch file when windows shutdown.

Discussion in 'Windows' started by adroit89, May 20, 2009.

  1. adroit89

    adroit89 New Member

    Joined:
    Jan 5, 2007
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    hii guys...i want to know how we run a batch file when windows is shutting down.i just want to write the time of shutdown into a text file using the batch file.
     
  2. !Newbie!

    !Newbie! New Member

    Joined:
    Apr 13, 2009
    Messages:
    128
    Likes Received:
    3
    Trophy Points:
    0
    Location:
    Around
    Create a batch file with the following commands.
    cd\
    shutdown -s -t 60

    You could also use the Scheduled task app to schedule a shutdown at a specified time.
     
  3. adroit89

    adroit89 New Member

    Joined:
    Jan 5, 2007
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    i dont want the batch file to shutdown the system.i want a batch file to run when ever user shutdowns his system.
     
  4. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
  5. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice