PC TIPS AND TRICKS

αℓℓ αяє ωєℓ¢σмє тσ συя ѕιтє:
נσιη υѕ αη∂ Ⴣαιℓє συя ѕєяνι¢єѕ
lyk us on fb to get updaed:

CMD, the basics and a few scripts

CMD

CMD is short for commander.
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?
-----------------------------------------------------------------------------------------------



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.)

If you write
---------------------------------------
@echo off

cls
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.

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.


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.


@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.

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.

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

cls
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.

The : infront of "a" must stay where it is.
Bad example:
goto: a

Good example:
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.

Moving away from learning commands now.



-----------------------------------------------------------------------------------------------
Lets make a spamm script.
-----------------------------------------------------------------------------------------------



-----------------------------------------------
@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.



-----------------------------------------------------------------------------------------------
Lets just mess around.
-----------------------------------------------------------------------------------------------



-----------------------------------------------
@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.
_______________________________________________________________________________________________________________________________________________________________________________________________
shutdown Your Computer or a Remote Computer via Command Prompt

Most of us shutdown our computers using the power button given in the Start menu. Some of us use the physical power button on our machines. Very few people actually use other means of shutting down a computer and even less is the number of people who use the command prompt to shutdown a computer.

A reason for this is that most of us don't know that the command prompt can be used to not only shutdown, restart or log off our computer instantly but also to shutdown a remote computer provided you have administrative access. It can also be used to hibernate a computer and give a comment containing the reason for shutdown. This post will show you how to do all this.

Required
A computer running Windows (XP, Vista, 7 or 8) with the command prompt working perfectly, i.e. not disabled by a virus.

Initial Steps
1) Press Windows Key + R.
2) Enter CMD and press Enter.

This will start the command prompt. Follow the instructions below depending on what you want to do.

Shutdown Local Machine (Your Computer)
Type "shutdown -s" without the quotes in the command prompt and press Enter. Shutdown is the command being executed and the switch -s tells the computer to shutdown.

Restart your Local Computer
Type "shutdown -r" in the command prompt and press Enter. In this case, the command switch -r is telling the computer to restart after shutdown.

Log Off the Current User
Type "shutdown -l" in the command prompt and press Enter. The -l command switch tells the computer to log off.

Shutdown a Remote Computer
Type "shutdown -s -m \\name of the computer" in the command prompt and press Enter. Replace \\name of the computer with the actual name of the remote computer you are trying to shutdown. As mentioned earlier, you must have administrative access to the computer you are trying to shutdown. To know if you have administrative access, press Windows key + R and then type the name of the computer and press Enter.

Note: If you don't remember the name of the remote computer, you can look for it by opening a list of all the computers you are connected to by executing "net view" in command prompt.

If you can connect to the computer, you will be asked to login with your username and password. Upon entering them, a window will display the list of all the directories available to you. This should help you know whether you can or cannot shutdown the remote computer.

Hibernate a Local Computer
Type in "Rundll32.exe Powrprof.dll,SetSuspendState" without the quotes and press Enter. Your computer should hibernate, if it does not, then you must enable hibernation to do this.

Shutdown your or a remote computer after a specific time
Type "shutdown -s -t 60" to shutdown your computer after 60 seconds. Upon executing this, a countdown timer displaying a warning message will be shown. This command uses the -t command switch followed by a variable (which is 60 in this case) which represents the number of seconds after which the computer will shutdown.

Display a Message containing the reason for shutdown
Type shutdown -s -t 500 -c "I am tired. I don't want to work anymore." (with the quotes) and press Enter. The -c switch is used in the code to give the reason for shutting down and what is followed in quotes will be displayed in the dialog box as the reason. This can be used to display all sorts of funny messages. One example :-

Skynet has become self aware. John Connor did not stop me. You can not use your PC anymore.

Stop a System Shutdown
Type "shutdown -a" and press Enter. This will stop the system from shutting down if the countdown to shut down has not reached 0.
copyrightedPCTT ---sitemap