Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,474 members, 7,808,713 topics. Date: Thursday, 25 April 2024 at 03:52 PM

Shutting Down A Computer Using Notepad (beginners Tutorial) - Programming (2) - Nairaland

Nairaland Forum / Science/Technology / Programming / Shutting Down A Computer Using Notepad (beginners Tutorial) (6063 Views)

Where Can I Download A Functioning Notepad++ For Mobile Version From? / Trick: How To Make A Simple Calculator Using Notepad. / 10 Coolest Notepad Tricks (2) (3) (4)

(1) (2) (Reply) (Go Down)

Re: Shutting Down A Computer Using Notepad (beginners Tutorial) by Nobody: 9:47pm On Jan 23, 2016
This @dcss guy needs to be whooped hard..

I don't talk too much, You think you know better..

We can have a quick code contest, you and i..One ring, lol

I like you man! wink
Re: Shutting Down A Computer Using Notepad (beginners Tutorial) by Nobody: 11:00pm On Jan 23, 2016
^^^Funny dude, after all my trollin' i was expecting you to level the entire board. . . . .just kidding, i just wanted a little excitement and do not mean harm o.
To all of you dudes that actually think that I am opposing the OP, well, you are wrong!
Re: Shutting Down A Computer Using Notepad (beginners Tutorial) by sinequanon: 11:10pm On Jan 23, 2016
no no no no no

there is only one way to resolve this impasse.

the first one to write a program that finds the 1000th prime number (primes: 2, 3, 5 7...) that doesn't contain the digit 4 (when written in decimal) wins the... whatever argument or egofest is at stake...

let the coding begin...
Re: Shutting Down A Computer Using Notepad (beginners Tutorial) by Nobody: 8:52am On Jan 24, 2016
I dont even know what a prime number is. . . .
Re: Shutting Down A Computer Using Notepad (beginners Tutorial) by Nobody: 11:44pm On Jan 24, 2016
I could've done that for fun bro, but that's child's play!

Bring something more realistic to the table and we gon' play..

..just joking tho, I also don't know what a prime number is.. wink

@Timtoday and everyone who had my back earlier grin , Thanks peeps.
Re: Shutting Down A Computer Using Notepad (beginners Tutorial) by Nmeri17: 4:28am On Jan 25, 2016
dhtml18:
I dont even know what a prime number is. . . .
me thinks it refers to the phone number of a prime minister. that's why its called "prime minister's number" wink
Re: Shutting Down A Computer Using Notepad (beginners Tutorial) by Nobody: 5:34am On Jan 25, 2016
Oh, like the prime numbers signature contest that seun did back then abi? Only in this case, we want to generate the phone number rather than signature of the prime minister? then i am all game.

1 Like

Re: Shutting Down A Computer Using Notepad (beginners Tutorial) by mxplosvtoluene(m): 3:16am On Feb 23, 2016
07089321409, add me
DanielTheGeek:
Notepad is a free text editor that comes with Computers running the Windows OS, It is also a competent code editor...many don't know this, Some people use it for quick typing!
We will be creating a command that will shut the computer down when run, also we will set a timer that shuts down the computer at "X" seconds!

Enough of my talking and let's get started..



First Step:

Open Notepad (You can find Notepad by clicking the Start menu and selecting "Programs" → "Accessories" → "Notepad". You can also click the Start menu, type notepad, and press ↵ Enter.)
See Illustration below


Second Step:

Type
shutdown.exe -s
on the first line. This is the command to shut down the computer.
See Illustration below


Third Step:

Add a timer by using the
-t
flag. By default, the shutdown process will be delayed by 30 seconds. You can change this by using the
-t
gflag with the number of seconds you want to delay.

For example, to create a shutdown command that waits 45 seconds, type
shutdown.exe -s -t 45

To create a shutdown command that shuts the computer down immediately, type
shutdown.exe -s -t 00

See Illustration below


Fourth Step:

Add a message to be displayed. If you want, you can add a personalized message to the shut down notice by using the
-c
flag. Simply, type
shutdown.exe -s -t 45 -c "comment"
. The comment must be in quotes.[1]

For example, you can let the user know how long until the shutdown begins by typing
shutdown.exe -s -t 45 -c "Computer will shut down in 45 seconds"
or
shutdown.exe -s -t 45 -c "Hey, My name is Daniel and i'm shutting this computer down NOW"

LOL, don't do that.. that's mean, but for a prank...Who cares?
See Illustration below


Fifth Step:

Click "File" and select "Save As". You will need to save the file as a batch file, which Windows can execute to run the shutdown command.


Sixth Step:

Click the "Save as type" drop-down menu and select "All Files (*.*)". This will allow you to change the file type.


Seventh Step:

Delete the
.txt
from the end of the file name. Replace it with
.bat



Eight Step:

Save the file. A new copy will be created with the
.bat
extension, and it will have a different icon than a standard text file.
See Illustration below


Final Step:

Run the newly-created file to run your shutdown process. The shutdown will occur according to the rules you created.
Make sure you've saved anything you need to before running the shut down program.

**If you reached the final step, Thumbs up..
**More tutorials will be available, you can send me a topic request through Nairaland.
**If you wish to join my new Whatsapp group, feel free to send your numbers to me and i'll add them up.
**This tutorial is solely for educational purposes so i am not in any way responsible for whatever illegal content made out of this tutorial.

Best Regards,
Daniel Omoniyi



Re: Shutting Down A Computer Using Notepad (beginners Tutorial) by larisoft: 9:04am On Feb 23, 2016
dhtml18:

I can even close my eyes and do that on windows. Just press LOGO-KEY + R, type command and press enter, no need of prompt sef.
Why would i want to write that in a batch file? I get better things to do with a batch file o jare - dont let us even go there. I be master for batch-file writing, but it is a basic skill that every win32 programmer should have.

Writing batch file for a windows programmer, is like writing bash files for linux - but i be cross-platform programmer sha.

This OP is just a bloody attention seeker, ain't even got better post to make sef. Deserves a permanent ban for constituting nuisance to the board.

@dhtml, are you sure you are not the one seeking attention? You honestly amuse me with your posts on this forum atimes. He has posted what he knows which many of us humble users do not. You know it. We dont. Would the world have shattered to pieces if you didnt rub it in our faces that you can do it with your eyes closed? And who asked if you are a cross platform batch programmer with unix skills? Do you know how many of us know same, and are quietly lauding the OP for being generous with his knowledge?

I know you and know you are a little skilled, but this is just immature.

@OP, thank you jare. I 've been using this to shutdown my system using a timer everynight (Love playing music at night) , but the adding comment thing never occurred to me till you posted this. Thanks, man!!!

1 Like

Re: Shutting Down A Computer Using Notepad (beginners Tutorial) by Nobody: 1:20pm On Feb 23, 2016
larisoft:


@dhtml, are you sure you are not the one seeking attention? You honestly amuse me with your posts on this forum atimes. He has posted what he knows which many of us humble users do not. You know it. We dont. Would the world have shattered to pieces if you didnt rub it in our faces that you can do it with your eyes closed? And who asked if you are a cross platform batch programmer with unix skills? Do you know how many of us know same, and are quietly lauding the OP for being generous with his knowledge?

I know you and know you are a little skilled, but this is just immature.

@OP, thank you jare. I 've been using this to shutdown my system using a timer everynight (Love playing music at night) , but the adding comment thing never occurred to me till you posted this. Thanks, man!!!
You amuse me as well in your comments, are you envious of me? and wish i will just shut-up? Maybe i will, but lets see what you have to offer first before we talk shop. . . .yawns very loudly and trolls into the next thread
Re: Shutting Down A Computer Using Notepad (beginners Tutorial) by Nobody: 9:17pm On Feb 23, 2016
larisoft:


@dhtml, are you sure you are not the one seeking attention? You honestly amuse me with your posts on this forum atimes. He has posted what he knows which many of us humble users do not. You know it. We dont. Would the world have shattered to pieces if you didnt rub it in our faces that you can do it with your eyes closed? And who asked if you are a cross platform batch programmer with unix skills? Do you know how many of us know same, and are quietly lauding the OP for being generous with his knowledge?

I know you and know you are a little skilled, but this is just immature.

@OP, thank you jare. I 've been using this to shutdown my system using a timer everynight (Love playing music at night) , but the adding comment thing never occurred to me till you posted this. Thanks, man!!!

You are welcome, i am glad you found this useful.

into web development? check out how to use the .htaccess file to improve and better secure your website(s). https://www.nairaland.com/2952155/using-htaccess-file-improve-website

(1) (2) (Reply)

Different Ways To Earn $1000 Online Monthly / Marquee Code In Vb / LAGOS Professional Training On Web Design&development With Certification..

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 40
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.