Create .bat/.cmd to shutdown computer

Discussion in 'Operating Systems' started by Jiffyman, Jun 25, 2007.

  1. Jiffyman

    Jiffyman New Member

    Right now I'm trying to create a file that will shutdown my computer at a certain time from a remote location. I tried to make a file, but am not quite sure on how to. This is what I wrote in both .cmd and .bat files

    Shutdown -s -m \\192.168.2.X

    Then I just saved the file as a .cmd or .bat.,but it didn't work. Can someone please give a hint at what I am doing wrong?
  2. Jiffyman

    Jiffyman New Member

    I've also tried the command like this.

    @echo off
    shutdown -s -m \\192.168.2.X

    It still doesn't work. Quite frankly I'm not even sure if it is possible to create a .cmd/.bat file that will do this. Is it possible?

    O.k. I got it to work, but cannot do a network shutdown. This is how I did it.

    "shutdown.exe -f -s" Without quotes. Then I saved it as a .bat file. Is it possible to do a network shutdwon with a bat file?
    Last edited: Jun 25, 2007
  3. Viking

    Viking New Member

  4. patrickv

    patrickv Active Member

    nice.. i will try it on some of my friends
    just kidding
  5. Trizoy

    Trizoy VIP Member

    I dont know if you can send a remote shutdown message... You might be able to run a file from a remote computer.
  6. Jiffyman

    Jiffyman New Member

    Yeah I get the shutdown dialog box, but not with network shutdowns. I've already set it as a task that runs at a certain time, but it's still kinda sketchy and that why I wan't it to run from a remote computer. We've been having problems wit my lil bro staying on the computer all night so I set him up on a domain account and set logon hours the only problem is, is that my server doesn't log him off after his hours are up. So I'm trying to set this up to counter-act the problem. If anyone has any Ideas on how I could do this without a script that runs when his hours are up that would be great.

    Dur no wonder why it was sketchy it wasn't set so users could run the task automatically. Anyways thanks for the help. If anyone can tell me how to do it remotly that would be great.
    Last edited: Jun 26, 2007

Share This Page