CMD is short for commander.
It is great for a lot of things and itās also very clean.
It is great for a lot of things and itās also very clean.
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Lets learn how to make the computer shut down everytime itās booted, shall we?
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Lets learn how to make the computer shut down everytime itās booted, shall we?
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
First open CMD,
Next open notepad.
If you write āstart shutdown -rā in CMD and press enter, your computer will restart. Also if you write the same in ārunā.
(Change -r to -s to shutdown computer, or write -l to logg off.)
(Change -r to -s to shutdown computer, or write -l to logg off.)
If you write
āāāāāāāāāāāāā
@echo off
āāāāāāāāāāāāā
@echo off
cls
start shutdown -r
start shutdown -r
cls
goto :a
āāāāāāāāāāāāā
in notepad and save it as something.bat (bat is important) and then open it, your computer will restart in the same way.
goto :a
āāāāāāāāāāāāā
in notepad and save it as something.bat (bat is important) and then open it, your computer will restart in the same way.
So, lets get into autostart. Put that bat file in autostart (autostart can be found in start menu) and each time your
computer is booted it will start that file and your computer will restart.
If you write the next script your computer will try to shutdown several times at once. it will freak for about half a minute
and then turn off.
computer is booted it will start that file and your computer will restart.
If you write the next script your computer will try to shutdown several times at once. it will freak for about half a minute
and then turn off.
Lets get a better understanding how scripts works. The above script shuts down your computer, but a bat file normaly opens
CMD and does whatever you told it to do.
CMD and does whatever you told it to do.
@echo off ā This is where you put commands that shouldnāt be shown as text. For example cls. You donāt want that to be text,
itās a command.
itās a command.
cls ā This one is pretty good, it clears the text in the CMD screen
CMD ā This command gives you a new CMD session.
start ā this triggers stuff, in this case itās shutdown.
color ā changes the colour in the cmd window, I recommend writing ācolor 0aā, which is a green color thats really cool
on a black window.
on a black window.
title ā write ātitle somethingā to change title.
goto :a ā This one is really, really, really, really cool. Itās used for making loops and some more advanced stuff that I
wont go into. Lets say you write
āāāāāāāāāāāāā
@echo off
:a
cls
start shutdown -r
wont go into. Lets say you write
āāāāāāāāāāāāā
@echo off
:a
cls
start shutdown -r
cls
goto :a
āāāāāāāāāāāāā
goto :a
āāāāāāāāāāāāā
The goto :a tells you to go to :a higher up in the script. so it starts the script again, then it does the goto :a command
again and the script reloads. Basicaly a loop. You can change the āaā to whatever you want, for example āerrorā. This is
only to make it easier for you to read your script.
again and the script reloads. Basicaly a loop. You can change the āaā to whatever you want, for example āerrorā. This is
only to make it easier for you to read your script.
The : infront of āaā must stay where it is.
Bad example:
goto: a
Bad example:
goto: a
Good example:
goto :a
goto :a
āāāāāāāāāāāāā
dir ā This shows you the files in the directory you are in.
dir /s ā This shows you all the files on your computer.
echo ā write āecho somethingā and it will be as a text in cmd.
echo. This is a linebrake.
cd ā Write cd followed up with a location, to go there in cmd. For example ācd c:\windowsā.
cd .. ā This goes back one step in the directory. For example if your in c:\windows and write ācd ..ā you go back to c:\.
So now you know the basics, which weāll use to make you computer do stuff. In cmd you can write āhelpā to get a list of most
commands.
commands.
Moving away from learning commands now.
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Lets make a spamm script.
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Lets make a spamm script.
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāā
@echo off
cls
:a
start notepad.exe
goto :a
@echo off
cls
:a
start notepad.exe
goto :a
āāāāāāāāāāāāāāāā
this script will continue to open notepad until you close cmd. Not recommended to run this on a slow computer.
As we said before, āstartā triggers things, this script triggers notepad and then the loop (goto :a) is triggered.
this script will continue to open notepad until you close cmd. Not recommended to run this on a slow computer.
As we said before, āstartā triggers things, this script triggers notepad and then the loop (goto :a) is triggered.
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Lets just mess around.
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Lets just mess around.
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāā
@echo off
cls
:a
taskkill /im explorer.exe /f
goto :a
āāāāāāāāāāāāāāāā
@echo off
cls
:a
taskkill /im explorer.exe /f
goto :a
āāāāāāāāāāāāāāāā
This will close the bar where start menu and tasks are shown, for example if you open internet you will see it at the bottom
of the screen on the explorer bar.
Closing this will leave people with little things to do.
of the screen on the explorer bar.
Closing this will leave people with little things to do.
0 comments:
Post a Comment