Sunday, June 9, 2013

Shutdown Your Computer or a Remote PC via Command Prompt Simple Steps

Shutdown Your Computer or a Remote PC via Command Prompt


Shutdown computer with command promptMost 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.

HOW TO LOCK or HIDE FOLDER OR FILES WITHOUT ANY SOFTWARE

 HOW TO LOCK FOLDER OR FILES WITHOUT ANY SOFTWARE

Password Protect folders in Windows without any Software
Most of us have private data. Not all of us have a private computer to keep that data. So, we just end up with other people viewing that data. Although password protecting software do work, it is almost useless to hide private data with these software(because we are always questioned as to what it is that we are hiding with the help of these software).

Hidden folders do not work as they can be easily searched with Windows Search. So, we need an alternative way to create hidden password protected folders which only we can access. And that is exactly what we will learn in this post.

With this trick, you can create a secure password protected folder in Windows which no one except you can access. To use this trick, follow the instructions given below:-
1.  Open Notepad.
2.  Copy and paste the exact code given below:-

    cls
    @ECHO OFF
    title techchating.blogspot.in
    if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
    if NOT EXIST MyFolder goto MDMyFolder
    :CONFIRM
    echo Are you sure to lock this folder? (Y/N)
    set/p "cho=>"
    if %cho%==Y goto LOCK
    if %cho%==y goto LOCK
    if %cho%==n goto END
    if %cho%==N goto END
    echo Invalid choice.
    goto CONFIRM
    :LOCK
    ren MyFolder "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
    attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
    echo Folder locked
    goto End
    :UNLOCK
    echo Enter password to Unlock Your Secure Folder
    set/p "pass=>"
    if NOT %pass%== www.techchating.blogspot.in goto FAIL
    attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
    ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder
    echo Folder Unlocked successfully
    goto End
    :FAIL
    echo Invalid password
    goto end
    :MDMyFolder
    md MyFolder
    echo MyFolder created successfully
    goto End
    :End



Hide Folders without any Software


3.  Click on the File Menu. Click on Save As.
4.  Select All Types in the Save As Type drop down menu. Save the file as *.bat or Locker.bat.


After creating the file, double click on the Saved file. A new folder will be created. Enter your data in the folder. Again, double click on the batch file. Type Y and press Enter. The folder will be hidden from view.

To re-view your folder, double click on the saved batch file. Enter password as "www.techchating.blogspot.in" without quotes and press Enter key. This is also the default password. Your folder will be visible again.

To change the default password, edit the part of the code given in blue and enter your own password.

The overall usability of this trick can be improved by deleting the batch file after hiding your folder and re-creating it when you wish to access your folder again.

If you face any problem using this trick, you can write a comment and I will do my best to help you.

Note: This works on Windows 7, Windows XP and Vista. First try this on useless data to be sure and then only hide your personal data.
hope u understood.....

Thursday, May 30, 2013

How to recover hidden data (infected files) from virus infected USB/Pendrive/Flash drive/Hard disc

How to Recover Hidden Files From Virus Infected USB Pendrive without any Software :

Insert infected drive(flash,usb,pen drive,external hard disk) into computer and find drive letter of connected USB drive
For Example, I:

Now click on Start --> Run
In Run box, type cmd and hit Enter
Now command prompt will appear, in command prompt type the drive letter of your pen drive and hit Enter.
c:\users\name> I:

Example <type I: >


After that, type attrib -s -h /s /d *.*


Now hit Enter and wait for sometime.
You have done ... Now you can view all your files in pen drive without any problems.