Help with a .bat file

Discussion in 'Computer Software and Operating Systems' started by Eastonator12, Feb 23, 2017.

  1. Eastonator12
    OP

    Eastonator12 GBAtemp Fan

    Member
    433
    119
    Aug 16, 2016
    United States
    Hello there, I am trying to make a .bat file to prank my friend. I want the batch file to open cmd and execute a command, but everything i'm trying doesn't work. I want it to run the command: shutdown -s -t 1925000 -c “System error: overloaded porn folder”. Thanks
     
  2. GalladeGuy

    GalladeGuy Freeze Kirby :3

    Member
    2,602
    2,665
    Oct 28, 2015
    United States
    Can you not just write that in a bat file? Bat files execute CMD commands already, so you don't have to open CMD.
     
  3. Eastonator12
    OP

    Eastonator12 GBAtemp Fan

    Member
    433
    119
    Aug 16, 2016
    United States
    I'll upload the txt file so you can look at it...please tell me whats wrong with it
     

    Attached Files:

  4. Slattz

    Slattz Easygoing Fairy

    Member
    1,167
    1,277
    Nov 21, 2015
    Ireland
    @Eastonator12 This should be all you have to do. Uploaded as .zip as a .bat can't be uploaded.
     

    Attached Files:

  5. Eastonator12
    OP

    Eastonator12 GBAtemp Fan

    Member
    433
    119
    Aug 16, 2016
    United States
    yeah I realized that so I just put the text file up
     
  6. Slattz

    Slattz Easygoing Fairy

    Member
    1,167
    1,277
    Nov 21, 2015
    Ireland
    Also, you set the time to 1925000 seconds, you might want to edit the bat and change it to around 3 or something.
     
  7. Eastonator12
    OP

    Eastonator12 GBAtemp Fan

    Member
    433
    119
    Aug 16, 2016
    United States
    I did that because I didn't want to actually shut off his computer or anything like that, so it would give me enough time to cancel it. BTW, the .bat you gave me just opens cmd and sits on a blinking underscore in the top corner with no text...nothing happens
     
  8. Zaide

    Zaide GBAtemp Regular

    Member
    296
    120
    Apr 2, 2009
    United States
  9. Slattz

    Slattz Easygoing Fairy

    Member
    1,167
    1,277
    Nov 21, 2015
    Ireland
    Yea, I just tested, it seems the command can only be run from cmd (on W10 anyway), which is kinda odd.
    If you want, I could write a vbs script that opens cmd and autotypes the command and executes it?
     
  10. Eastonator12
    OP

    Eastonator12 GBAtemp Fan

    Member
    433
    119
    Aug 16, 2016
    United States
    that would be greatly appreciated, thank you
     
  11. tech3475

    tech3475 GBAtemp Advanced Fan

    Member
    728
    312
    Jun 12, 2009
  12. Slattz

    Slattz Easygoing Fairy

    Member
    1,167
    1,277
    Nov 21, 2015
    Ireland
    @Eastonator12 Heres a vbs script, it hides the cmd window (even though it only runs for a few milliseconds :P ).
    I set the time to 5 seconds so the person has a chance to read the shutdown message lol.
    Enjoy!

    — Posts automatically merged - Please don't double post! —

    Here you go, details above :)
     

    Attached Files:

    Last edited by Slattz, Feb 23, 2017
  13. Eastonator12
    OP

    Eastonator12 GBAtemp Fan

    Member
    433
    119
    Aug 16, 2016
    United States
    Thank you for this, is there any way I can change the icon to a folder icon?
     
  14. Slattz

    Slattz Easygoing Fairy

    Member
    1,167
    1,277
    Nov 21, 2015
    Ireland
    You could make a desktop shortcut to the vbs file and then change the icon of the shortcut to a folder icon? That's the only way I can think of.
     
  15. Eastonator12
    OP

    Eastonator12 GBAtemp Fan

    Member
    433
    119
    Aug 16, 2016
    United States
    yeah so what I did was get a pic of steve harvey and put it in a gay porn folder