Wednesday, May 5, 2010

15 Popular Command Prompt Tricks & Hacks

Sharing with you some useful tricks & hacks regarding Command Prompt.

* Save A List of Files to a Text File by Extension

>dir *.ext /s /b > files.txt

This command line will create a file called files.txt. When you open this file, there will be a complete list of all the files in that directory and all subdirectories with the .ext extension. You can then open up this text file in any text editor and work this the information.By changing the ext part, you can select different files. For example, if you wanted to list all of the PDF documents, you would type:

>dir *.pdf /s /b > files.txt

* Get Your IP Address Information

>ipconfig /all

This will retrieve a pile of information about your network connection and IP information. From this command, you can get:
Host Name
Primary DNS Suffix
Node Type
IP Routing Enabled
WINS Proxy Enabled
DNS Suffix Search List
Connection-specific DNS Suffix
Network Adapter Description
Physical (MAC) Address
DHCP Enabled
IP Address
Subnet Mask
Default Gateway
DNS Servers

*Get Installed Driver Information

>driverquery


It can be very useful when troubleshooting to know what drivers are installed on a system. This command will give you a complete listing of the drivers and when they were installed.
*Copy Files Via Infrared Port

>irftp filename.ext

This will fire up the Wireless Link dialog so that you can copy the specified file via an infrared port.

*Find Files Opened By Network Users

>openfiles /query

If you are running a system and you want to know who has files open on your computer, this command will provide you a list of those users and the files that they have open.
Note: If you get an error saying The system global flag ‘maintain objects list’ needs to be enabled to see local opened files, you can fix this issue by typing

>openfiles /local on
. You will have to reboot the system but it will resolve the issue.

*Monitor Port Activity

>netstat -a 30

This will show you all of the TCP/IP ports that are being used on your system and what they are connecting to (or being connected from). It will continue to monitor these ports and refresh the information every 30 seconds. You can change the refresh rate by changing the number at the end of the command.
Tip : Best Tips to Make Firefox 3+ Faster

*Recover Information From A Corrupt File

>recover filename.ext

If you have a disk with damaged sectors, you can attempt to recover as much information as possible from the damaged file. Data that is not damaged can be retrieved but data in damaged sectors will be lost.

*Defragment Remote Computer


>rexec remotePC defrag C: /F

This command used the rexec command to force a defragment of the C: drive on the computer named remotePC. You can use whatever you want to for the command (I just used defrag C: /F as an example). This is very useful for remote maintenance.

*Retrieve Detailed System Information


>systeminfo

With this command, you can retrieve the following information:
Host Name
OS Name
OS Version
OS Manufacturer
OS Configuration
OS Build Type
Registered Owner
Registered Organization
Product ID
Original Install Date
System Up Time
System Manufacturer
System Model
System type
Processor(s)
BIOS Version
Windows Directory
System Directory
Boot Device
System Locale
Input Locale
Time Zone
Total Physical Memory
Available Physical Memory
Virtual Memory Max Size
Virtual Memory Available
Virtual Memory In Use
Page File Location(s)
Domain
Logon Server
Hotfix(s)
NetWork Card(s)

*Automatically Defragment C: Daily

>schtasks /create /tn "Defrag C" /tr "defrag c: /f" /sc daily /st 23:00:00 /ru "System"

This will set your computer to automatically perform a complete defrag of the C: drive each day at 11:00:00 PM (23:00:00). It does this by creating a scheduled task called Defrag C. It will run this command under the computer’s system account.

*Map A Drive Letter to a Folder

>subst W: C:\windows

Sometimes, your directory structure can get pretty deep and complicated. You can simplify this a bit by mapping a drive letter to commonly used folders. In the example that I have given, this will create a drive letter W: and map it to the C:\windows directory. Then, whenever you go into My Computer, you will see a W: drive and when you browse to it, it will automatically take you to the contents of the C:\windows folder.
You can do this with any unused drive letter and any folder that exists on your system.

*List All Tasks Running On The Computer

>tasklist

It’s always good to know what is running on your system. This is the command line version of the processes tab in Taks Manager.

>Kill A Program

>taskkill /im programname.exe /f

If, when using the tasklist command, you discover that there is something running you just want killed. This is the way to do it! Just note the program name and use it in place of programname.exe.

*Reboot a Remote Computer


>shutdown -r -f -m \\remotePC -c "System will be rebooted in 20 seconds"

Sometimes, you just need to reboot a system. This will do it remotely and give the user a 20 second warning.
Tip : To open Command Prompt, click Start, click Run, type cmd, and then click OK.

Friday, April 2, 2010

Windows XP chkdsk always running after reboot

I was having this trouble when ever i reboot my computer my computer start check disk and i have to wait till its end or i need to press key in start to stop it but some time i miss to press key then what i say shh....

So i made search this problem here what i found and no more i am having this problem take a look.


Check Disk runs on every boot:

Open a command prompt...
Start >> Run >> Type: cmd >> Click OK >>
Type or paste the following line:

chkntfs /d

Hit the Enter key.
Chkntfs displays or modifies the checking of disk at boot time.


The /d switch restores the machine to the default behavior; all drives are
checked at boot time and chkdsk is run on those that are dirty.


Autochk.exe is a version of Chkdsk that runs only before Windows XP
starts. Autochk runs in the following situations:


Autochk runs if you try to run Chkdsk on the boot volume.
Autochk runs if Chkdsk cannot gain exclusive use of the volume.
Autochk runs if the volume is flagged as dirty.


This can happen if the drive's dirty bit is set.
When a drive's dirty bit is set, autochk automatically
checks the volume for errors the next time the computer is restarted.


This will report whether the dirty bit is set:


Start >> Run >> Type: cmd >> Click OK >>
Type or paste the following line:


fsutil dirty query C:


Hit the Enter key.
Volume C: is not dirty
Volume C: is dirty


[[If a volume's dirty bit is set, this indicates that the file system may be
in an inconsistent state. The dirty bit can be set because the volume is
online and has outstanding changes, because changes were made to the volume
and the computer shutdown before the changes were committed to disk, or
because corruption was detected on the volume. If the dirty bit is set when
the computer restarts, chkdsk runs to verify the consistency of the volume.


Every time Windows XP starts, Autochk.exe is called by the Kernel to scan
all volumes to check if the volume dirty bit is set. If the dirty bit is
set, autochk performs an immediate chkdsk /f on that volume. Chkdsk /f
verifies file system integrity and attempts to fix any problems with the
volume.]]
-----


This will also report whether the dirty bit is set:


Start >> Run >> Type: cmd >> Click OK >>
Type or paste the following line:

chkntfs c:

Hit the Enter key.
C: is not dirty.





Friday, March 26, 2010

Simple Ways to Make Your Windows Faster

    The best way to make your computer work fast is to reinstall your windows every 2nd year as every time you work on net or install anything in your computer there will be so many useless file will be created and those will make not only make your computer slow also case the damaging the system as well but if you made such thing and you don't want to uninstall windows then here is some useful tips for you just try these and i hope this will work for you as its work for me lol.

1. Drivers: always keep your drivers up to date.

2. Disable Hardware you don’t use: Using the Device Manager (Right-click on My Computer, click Properties, and go to the Hardware tab) you can disable any hardware on your computer that you do not use. Each piece of hardware requires time to load it’s drivers. Disabling stuff you don’t regularly use such as Firewire ports, PCI ports, and bluetooth could save you a couple seconds each time you start your computer. Don’t worry, you can always re-enable them any time you like!

3. Scan for Viruses and Spyware: If your computer had a sudden dramatic drop in speed, your problem may be Spyware or a virus. I suggest you download Ad-aware, Spybot S&D, (and AVG if you don’t already have Antivirus) to scan for bad stuff. Update each program and run a full scan.

4. Disable Unwanted Start-up Processes: Go Start > Run, type msconfig and hit enter. This will bring up the System Configuration Utility. Go to the start-up tab, and you will see all the programs that load when you start-up your computer. Do not disable any processes that you don’t understand. However you will probably recognize many that you don’t need at start-up, such as CD-burning software, or MSN messenger, or a P2P client. You can safely uncheck these to stop them from booting next time you start up your computer.


5. Uninstall software that you don’t use: most of the time you just install something for only little work then that software is no long for use then you can uninstall that. While it is true that installed software usually doesn’t affect computer performance if you don’t run them, some programs install things called “Services” which are similar to processes and run at start-up. You shouldn’t fool around disabling services, because usually you need most of them. The best way to ensure you don’t have any useless services clogging up your system is to uninstall any software you don’t need anymore.
 
6. Change the boot order in the BIOS: In most cases, your computer checks the CD drive, then the USB ports for bootable media before booting your hard drive. This detection can take multiple seconds depending on your hardware. If you own your computer and have access to the BIOS, you can change the order to boot from your hard drive immediately, thereby saving a couple seconds. If you ever need to revert, you can always change it back.

7. Disable Recent Documents: Every time your computer starts, Windows draws on a list of your most recently opened documents. Not only is this a potential privacy concern, but it can slow down your computer a small bit. You can easily disable this feature by right-clicking on your task bar > properties > Start Menu > Customize > Advanced.

8. Remove Extra fonts: You can save a significant amount of loading time by removing windows fonts that you don’t use. Fonts such as webdings and other fonts that you never use can be removed to save loading time. A good program to use is Font Frenzy, which removes all third-party fonts other than the default windows fonts.

9. Defragmenter your HD often: If you do heavy activity involving movies, pictures, and downloads, your computer will fragment more quickly. You should run a disk defragmenter at minimum once per month. This lowers the stress on your hard drive, thereby making it less likely to crash.

10. Hibernate instead of shutting down: If you have a laptop you can put it into hibernation, which is a state that uses no energy, but is quicker to restore from than starting up from scratch.