Diskpart: Format USB with Command Prompt

Curtesy: http://www.disk-partition.com/diskpart/diskpart-format-usb-4125.html

“Windows was unable to complete the format”

Many users would meet the error: “Windows was unable to complete the format” when they try to format their USB drive to FAT 32 or NTFS in Windows Explorer. But why would this happen?

Unable Format USB

There are many causes that can lead Windows format USB drive failed such as virus infection, the storage device damage, or there has bad sectors on the USB drive, or the USB drive is write-protected. Well, how can you format USB drive successfully under those circumstances?

Ways to format USB drive successfully

You may have a lot of problem about those questions, and you may take a lot of measures to overcome those bad situations like kill virus, check bad sectors, or release the write protection, and so on. Actually, there are many easier solutions.

Solution 1: Disk Management format USB drive

When you cannot format USB drive in Windows Explorer, or the USB drive not shows in My computer or Windows Explorer, you can go to the Windows Disk Management to format USB drive.

Step1. Open Windows Disk Management by typing “diskmgmt.msc” and pressing Enter in the search box.

Step2. Right-click the USB drive and select Format at the menu.

Disk Management Format USB

Step3. Then, select a file system to format USB drive into FAT 32, or NTFS, or others. Click OK to start.

However, if the USB drive is shown as unallocated space in Disk Management, here you need right-click the unallocated space, select “New Simple Volume” to create new partition for the USB drive. After creating partition on the USB drive, you will find that it has been formatted and it can be recognized by Windows Explorer.

Solution2: Diskpart format USB drive

Mostly, when the computer cannot recognize a USB drive, you can try to use Diskpart to format USB drive. Diskpart is a built-in tool that manage your hard drives. You can use it to format disk including internal or external hard drive. Diskpart format USB drive is much more effective than Windows Explorer. Here we’ll take an example of how to format USB drive with Diskpart while it is not shown in Windows Explorer.

1. Open the command prompt by typing “cmd” at the search box, right-click the program and select Run as Administrator.

Open CMD

2. Then,type “diskpart” and press enter to launch the program.

3. Next, type “list disk” to display all disks on your computer.

4. Type “select disk 2” and press Enter. Here disk 2 is the USB drive.

5. Type “clean” and press Enter.

6. Type “create partition primary”, press Enter.

7. Type “format fs=fat32 quick” or “format fs=ntfs quick” and press Enter to format USB drive to FAT 32 or NTFS as you want.

Diskpart Format USB

Finally, type “exit” to end up this, and you have already finished the task about Diskpart format USB. Then, you can active the partition and assign drive letter for the USB drive. For all this, Diskpart is dangerous for people who do not familiar with Diskpart cause all the operations cannot be revoked once the progress launched. Thus, if there is one mistake, you may get into a big trouble. Fortunately, there is another easy way to format USB drive that even a noob can do it alone.

Solution3: Format USB drive with AOMEI Partition Assistant

AOMEI Partition Assistant Standard is a remarkable free software that can manage your hard drive in Windows 7/8/10. You can use it to create/resize/delete/format/move/merge partitions in a few simple mouse-clicks in its intuitive interface. Format USB drive could be much simpler than Windows Disk Management or Diskpart format USB.

Step1. Plug in your USB drive to your computer. Download the freeware, install and launch it. All disks on your hard dive will be shown on its concise main interface.

Main Interface

Step2. Right-click your USB drive, select Format Partition at the drop-down menu.

PA Format USB

Step3. Here you can select the file system you need, edit the partition label and the cluster size. Here we format USB from FAT 32 to NTFS.

Select File System

Step4. Finally, click Apply at the toolbar to submit the operations.

Format USB Drive

Even though, AOMEI Partition Assistant still provides you the way to partition hard drive from command prompt including format USB drive with command prompt. AOMEI Partition Assistant format USB drive is a good alternative to Diskpart format USB drive. Besides, you can use it to do many other things for managing your hard drive better.

How to Use the Diskpart Utility to Assign and Remove Drive Letters

The Disk Management tool in Windows gives you an easy-to-use graphical interface to dealing with partitions and drive letters, but what if you want to just quickly change a drive letter on the command prompt? The diskpart utility makes it easy.

You’ll need to start by opening an administrator mode command prompt — type cmd into the search box, and then right-click and choose Run as administrator, or use the CTRL + SHIFT + ENTER keyboard shortcut.

Once there, run the diskpart command, and then type in the following to list out the volumes on your system.

list volume

You’ll want to note the volume number next to the drive that you want to change the letter of. In our case, that number is 3.

Now we’ll use the select volume command to tell diskpart to make changes to that volume. If your drive number is different, you’ll want to replace the 3 with the number in your configuration.

select volume 3

You should see a message that the volume is now selected.

At this point you can easily assign a new drive letter. Just type in this command, substituting R for the drive letter you’d like to use:

assign letter=R

Make sure to hit enter once you’re done, of course.

Once you’ve made that change, your drive should show up again as a new device, and be available for browsing immediately.

If you want to unassign a drive letter in order to hide the drive, you can also use the remove letter command in the same way. We wouldn’t necessarily advise doing this, of course.

Don’t bother trying to change your C: drive, because that’s not going to work.


How to Offline/Online a disk using Diskpart


If your computer has multiple disks, you may want to turn off one or more of your disks.


A computer with multiple disks, access to Windows command line, and Windows operating system.


From the task-bar, open the start menu. Search for cmd. In the command line, enter the command


Allow the Diskpart program to run. Enter the command

list disk

Example output:

DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 119 GB 0 B

The Status column lists the Online/Offline status. Enter the command:

select disk 1

but replace the ‘1’ with the desired disk number. Enter either the command

offline disk


online disk

Resetting Administrator Password in Windows 2012

Curtsy: http://www.kieranlane.com/2013/09/18/resetting-administrator-password-windows-2012/

Resetting Administrator Password in Windows 2012

Published on September 18th, 2013 | by Kieran

A few months ago I wrote a post about Resetting Administrator Password in Windows 2008. I thought I would see if the same worked for Windows 2012. Thankfully it does, with a few newer looking screens and a change in the paths. So here is the updated process which I did on a Windows 2012 Server running on VMware Workstation. The whole process is remarkably easy and quite quick.


To reset the password on your Windows 2012 server, simply complete the following steps:

  • Boot from the Micrsoft Windows Server 2012 DVD
  • From the Windows Setup menu, click “Next”.
  • Select “Repair your computer”
  • Under Choose and option, click on “Troubleshoot”.
  • Under Advanced options, click “Command Prompt”.
  • At the command prompt, run the following commands:
    cd windows\system32
    ren Utilman.exe Utilman.exe.old
    copy cmd.exe Utilman.exe
  • Close the command prompt and then click “Continue”.
  • The server should now boot and present the logon screen. Here click Windows Key + U.
  • At the prompt you can now change the password, by typing the following command:
    net user administrator Password123
    This will set the password for the Administrator user to be Password123 (case sensitive).

Closing the command prompt, you should now be able to log back onto the server using the password you have provided in the last step.

Cleanup Steps

Once you have verified you can log on to the server you will have repeat the steps above and boot using the Windows Server 2008 DVD/ISO and run the command prompt again.

  • Restart your server and once again, boot from the Micrsoft Windows Server 2012 DVD
  • From the Windows Setup menu, click “Next”.
  • Select “Repair your computer”
  • Under Choose and option, click on “Troubleshoot”.
  • Under Advanced options, click “Command Prompt”.
  • At the command prompt, run the following commands:
    cd windows\system32
    ren utilman.exe utilman.exe.new
    copy utilman.exe.old utilman.exe
  • Close the command prompt and then click “Continue”.

You should be back up and running as if nothing ever happened.


Here are some screenshots taken as I completed the password reset

Slide1 Slide2 Slide3 Slide4 Slide5 Slide6 Slide7 Slide8

Windows Command: Move files and directories to another location

Cartsy: http://www.windows-commandline.com/

This tutorial explains how to move files or directories to another location on a Windows system.

Move files to another directory

move filename destinationFolder

Example: to move file ‘data.docx’ to the folder ‘d:\backup\folder’

move  data.docx  d:\backup\folder\

You can also rename the file while moving it to the new location

move data.docx  d:\backup\folder\newData.docx

We can’t move multiple files with single command. i.e the below command would not work.

move file1 file2  D:\folder1\folder2

This would give the error The syntax of the command is incorrect.

However we can use wildcards to move files in bulk.  For example, if you want to move all text files from current folder to a new location you can use the below command.

move *.txt  destinationDirectory

To move all files starting with letter ‘A’, you can use below command.

move A*  destinationDirectory

Move directories


move directory newDirectoryPath

Example: To move the directory ‘data’ to ‘D:\data\folder1\’

move data D:\data\folder1

1. Can we move multiple directories using wild cards like the way we do it with files?
No, wild cards does not work for directories. You get the below error

C:\>move tmp* Documents\folder1\
The filename, directory name, or volume label syntax is incorrect.

2. How to specify the directories/files which have white spaces in the names?
You need to enclose the file or the directory name in double quotes.

Example: move "file with spaces"  "D:\directory with spaces"

Reboot Windows computer from command line (CMD)

We can reboot a Windows computer from command line using the in-built shutdown command.  Below you can find syntax of this command for various use cases.

Command to reboot windows computer:

shutdown /r

The above command will set a time out of 30 seconds to close the applications. After 30 seconds, windows reboot will start.

If you want to reboot Windows with your own time out value you can use the below command.

shutdown /r /t timeout_in_seconds

To shutdown a Windows computer:

shutdown /s

To abort computer reboot:

If you have issued a reboot command and have changed mind, you can stop Windows reboot by running the below command.

shutdown /a

To force applications to close without warning

shutdown /r /f

Open the shutdown GUI

shutdown /i

Add reason for the reboot of the computer

shutdown /r /c "This is the reason for the reboot of the computer"

The above commands for system reboot work on all Windows releases – Windows 7, Windows 8, Windows XP, Vista, Windows server 2003 and 2008.

Reboot Windows using WMIC commands:

You can run the below wmic command to reboot Windows OS.

wmic os where Primary='TRUE' reboot

How to Install and Configure Microsoft DNS Server




System TipThis article applies to a different version of Windows than the one you are using. Content in this article may not be relevant to you.Visit the Windows 7 Solution Center
This article was previously published under Q172953
Expand all | Collapse all

Collapse imageOn This Page

Collapse imageSUMMARY

This article is designed as an introduction to the Microsoft Domain Name Service (DNS) included with Microsoft Windows NT Server 4.0. This guide will take you through the steps needed to install and configure DNS on your Windows NT Server.

For additional information on Domain Name Service, please see the following white paper available on the Microsoft anonymous ftp server:

File Name: Dnswp.exe
Location : ftp://ftp.microsoft.com/bussys/winnt/winnt-docs/papers/
Title : “DNS and Microsoft Windows NT 4.0”


Installing Microsoft DNS

Use the following steps to install DNS on your Windows NT 4.0 Server:

  1. Click the Start button, point to Settings, and then click Control Panel. Double-click the Network icon, and then click the Services tab.
  2. Click Add, select Microsoft DNS Server from the Select Network Service dialog box, and then click OK.
  3. Type the location of your Windows NT source files, click OK, and then click Close.

    NOTE: If you have any service packs installed, you will need to re-apply your service pack before restarting your computer.

  4. Restart your computer.

Configuring Microsoft DNS

Gathering Information:

Before you actually begin configuring the DNS server, there is some basic information you will need. Some of this information must be approved by Internic for use on the Internet, but if you are configuring this server for internal use only, you can then decide what names and IP addresses to use. You will need:

  • Your domain name (must be approved by Internic)
  • The IP address of each server for which you wish to provide name resolution
  • The host names of each of the servers in step above

NOTE: The servers in the step above may be your mail servers, any public access servers, FTP servers, WWW servers, and so on.

For example, use the following information (substitute your actual information where appropriate):

   Domain Name: <Domain.com>
   Servers:   <Mail1.domain.com>
       <WWW.domain.com> (notice the same IP

Creating Your DNS Server:

Using the information above, configure your Microsoft DNS server by doing the following:

  1. Click the Start button, point to Programs, point to Administrative Tools, and then click DNS Manager.
  2. From the DNS menu, click New Server.
  3. Type the IP address of your DNS server in the Add DNS Server dialog box ( in the example information), and then click OK.

NOTE: It is not necessary to restart the DNS server for changes to your zones to take effect. All that is required is for the server data files to be updated using the following step:

  • In DNS Manager, right-click your DNS server, and click Update Server Data Files.

Creating Your Reverse Lookup Zone:

Some applications use a reverse query to a DNS server to find the host name of a host when it has the IP address of the computer. You must configure a reverse lookup zone to provide this capability.

NOTE: Reverse lookup zones may not be necessary in your network, but it is recommended that one be present. NSLOOKUP run on the DNS server will fail if no reverse lookup zone is configured.

To create a reverse lookup zone, perform the following steps:

  1. In DNS Manager, right-click your DNS server, and then click New Zone.
  2. Click Primary from the “Creating New Zone for” dialog box, and then click Next.
  3. The Zone Name is derived from your IP network address. In the example information, the Zone Name is 58.168.192.in-addr.arpa. Type your reverse zone name (the least significant part of the IP address, and work toward the most significant part of the address). For example:
       If your network ID is:         Then your reverse zone is:
                         10.in-addr.arpa                     20.130.in-addr.arpa                   203.30.250.in-addr.arpa

    NOTE: The syntax of the reverse lookup zone is imperative to its operation.

  4. After you type the reverse lookup zone name, press Tab and the reverse lookup zone file name will automatically fill in using the zone name in step 3 appended by “.dns” (without the quotes).
  5. Click Next, and then click Finish.

Creating Your Forward Lookup Zone:

  1. In DNS Manager, right-click your server, and then click New Zone.
  2. Click Primary Zone, and then click Next.
  3. Type the Zone Name for your DNS domain. This is the domain name that is registered with Internic (<Domain.com> in the example).
  4. Press Tab, click Next, and then click Finish.

When you have created the forward lookup zone, you should see three records automatically created in that zone: the NS record, the SOA record, and an A record. If you do not have all three of these, you may want to verify that your DNS settings in your TCP/IP properties are configured correctly (click the Start button, point to Settings, click Control Panel, and then double-click the Network icon).

NOTE: The A record will only be created if the zone name matches the domain name.

Adding Host Records to Your Forward Lookup Zone:

The A record for your DNS server should have been automatically created. However, DNS Manager does not automatically create the PTR record in the reverse zone for the DNS server. The simplest way to correct this is to use the following steps:

  1. Right-click the A record for your DNS server, and then click Delete Record.
  2. Click Yes in the confirmation dialog box.
  3. Right-click your forward zone, <Domain.com>, and then click New Host.
  4. Type the host name of your DNS server and the IP address.
  5. Click Create Associated PTR Record to enable it and click Add Host.
  6. Click Done.

NOTE: Repeat steps 3-5 above for all of the servers that you want to add to your DNS domain.

To verify the PTR records are created successfully, right-click the reverse lookup zone 58.168.192.in-addr.arpa, and then click Refresh.

Configuring Other Record Types

A DNS server can be responsible for several different record types. Some of them include, but are not limited to the following: A, CNAME, HINFO, MX, NS, and SOA. For details on these and other record types, please refer to the DNS white paper mentioned earlier in this article.

Creating A CNAME Record:

A CNAME record allows you to use multiple names for the same IP address. This way, you can have users access the same server for separate functions, such as FTP1.domain.com and WWW.domain.com. Before you can create the CNAME record, you must first have an A record, as described earlier.

To create a CNAME record, perform the following steps:

  1. Right-click your forward zone, <Domain.com>, and click New Record.
  2. Select CNAME Record from the Record Type list box in the New Resource Record dialog box.
  3. Type an alternate name for access to this computer. For example, in the sample information earlier in this article, WWW is an alternate name for FTP1.domain.com.
  4. Type the original host name in “For Host DNS Name.” For example, <FTP1.domain.com>.

    NOTE: It is important to use the fully-qualified domain name (FQDN) for the originating host DNS name.

  5. Click OK.

Now when your users make a query for either of these host names, your DNS server will return the same IP address.

Creating an MX Record:

An MX Record is a Mail Exchange record that points mail programs to your mail servers. To create an MX record, perform the following steps:

  1. Right-click your forward lookup zone, <Domain.com> and then click New Record.
  2. Select MX Record from the Record Type list box in the New Resource Record dialog box.
  3. The Host Name (Optional) field is used for the host name of the mail server. However, if you want users to be able to send mail to your domain using the format USER@Domain.com, then leave the Host Name field blank. NOTE: If the MX record contains the hostname, sending mail to user@domain.com may not work. There are three ways to resolve this. First, remove the hostname from the MX record as described in step 3. Second, after the MX record is created with the hostname, create an “A” record for the domain that has no hostname. Third, delete the existing MX record and re-create as described in steps one through six in the Creating an MX record section of this article.
  4. Type the FQDN of the mail server in the Mail Exchange Server DNS Name, for example, Mail.domain.com.

    NOTE: There is a trailing dot, “.”, after the Mail Exchange Server DNS Name. The FQDN that is used for the Mail Exchange Server must have a corresponding A record for that domain. If the Mail Exchange Server is a different computer than the DNS Server, the DNS Server must know where to redirect the mail traffic.

  5. The Preference Number is any number from 0 to 65535. In the case of multiple mail servers, this number identifies which mail server is to be used first. The lower the preference number, the higher the priority.
  6. Click OK.

For additional information, please see the following article in the Microsoft Knowledge Base:

174419 How to Configure a Subnetted Reverse Lookup Zone on Windows NT

Dev Environment: Install and configure BIND DNS Server in Windows 7

Power up your Web Developer environment installing Bind 9 DNS Server. Specially it will delight you if you are using VirtualBox or Vagrant to run your Back-end stack, but your browser still is in the Host OS, in this case Windows (More about this in the next blog post)

These are the main benefits you will get:

  • You want to have a domain *.dev or *.l being resolved to your localhost or IP of your Virtual Machine.
  • It allows you to run complex forwarding rules, including port forwarding. Forget the limitations of the Windows hosts file.
  • Bind acts also as local DNS Cache: maximum performance when browsing. (*)
  • With the Bind installation you will get all those yummy linux network tools: dig, nslook, nsupdate, etc in your Windows Command shell.

The caveat it’s that Bind it’s not that easy to configure. That’s the reason I created this tutorial:
Let’s go:

1. Download BIND (latest release now is 9.9.1-P3)

2. Let’s start with the Installation:

BIND Installation window

In the installer window, leave the default name “named” and password.

3. In System Properties => Environment Variables, find the variable PATH and append the string ;%SYSTEMROOT%\SysWOW64\dns\bin; (in case of Windows 64 bits) or ;%SYSTEMROOT%\system32\dns\bin; for Windows 32 bits.

4. Search for the DOS prompt cmd.exe and important!, right click and “Start as administrator”. Now browse to:
or in Windows 32 bits:

5.. By default the dns\etc folder is empty. Not for long. Execute the command:

rndc-confgen -a

This will create a file rndc.key.

In some tutorials you will see a extra step to create a rndc.conf file. That is not needed. If you do it. you will end up probably with messages like this when trying to “rndc reload”:
WARNING: key file (rndc.key) exists, but using default configuration file (rndc.conf) (See)

Also you don’t need to create a resolv.conf file, since Bind will look in the registry for the required nameserver information.

7. BIND Configuration files:

Let’s configure Bind. It’s better to run notepad commands directly from the already opened “Admin” shell, so you won’t have Access denied problems later when saving the file.

notepad named.conf

Copy/paste this configuration:

options {        
  directory "c:\windows\SysWOW64\dns\etc";
  allow-transfer { none; };

  channel my_log{
    file "named.log" versions 3 size 2m;
    severity info;
    print-time yes;
    print-severity yes;
    print-category yes;
  category default{

At the beginning, is useful a verbose log with severity: info. Later when you get the DNS server working, change it to severity: warning.
All the options for the logging are explained here.

There is no controls statement, so the default configuration will be Bind running on port 953.
If you are curious, the full list of statements that can be used (with default values in bold).

Use that IP in your DNS configuration of your Internet Connection, and you will start using Bind to resolve DNS lookups.

8. Search for “Services” in the Windows Start Menu and find in the list ISC BIND and start it.

If for some reason it’s not working and you are trying different BIND configurations, check the named.log file for hints.

Each time you change the configuration you will need to follow these 2 steps, in this order:

ipconfig /flushdns
rndc reload

Or you can reload the BIND Service from the GUI too. See the screenshot:

That’s all.
You should be able to surf the web normally and you could disable the Windows built-in DNS Cache Client (in the Services).

The purpose of this first part is to have a minimalistic configuration to get BIND running with logging so it’s easier to debug if you run into problems.

But with this configuration, you are letting Bind to resolve the DNS using its built-in list of root name servers, a quite slow process. DNS Lookups can take as much as 3 seconds.

You can tell to Bind to forward the requests to a faster DNS services, like Google’s

Change the options of your named.conf to add the “forwarders” line:

options {        
  directory "c:\windows\SysWOW64\dns\etc";  
  forwarders {;;};
  allow-transfer { none; };

Restart the ISC BIND Service. Now the DNS lookups are taking in my case about 22ms-40ms

If you want to optimize your DNS configuration, run some Benchmark with any of these tools: GRC DNS Benchmarking or NameBench. Here are some screenshots from Helsinki, a Welho Cable connection:

Let’s explore more advanced configuration and options in the next blog post. I will post it in Twitter or by RSS.

Extra: Tips for debugging DNS issues and more

Hint: Almost every DNS problem I had configuring BIND and testing were because a DNS Cache in my way:

Query logs

This useful command will make that all DNS lookups are logged in the named.log file. If you reload the service, it will stop.

rndc querylog

About the internal Windows DNS Cache

You can locate this Service by the name “DNS Client”. Related commands:

    • To inspect the Windows DNS Cache: ipconfig /displaydns.
    • To clear the Windows DNS Cache: ipconfig /flushdns.

Tip: Create a shortcut in the Desktop with the value "C:\Windows\System32\ipconfig.exe /flushdns"

What’s the benefit of Bind as your DNS Cache, instead of Windows DNS Local Cache?
I don’t think there are any performance benefits, and both caches are non-persistent, in the way that rebooting the computer will clear the DNS Caches.
But one adventage of using Bind, it’s that you can disable then the Windows DNS Cache and protect against some DNS Poisioning attacks due of malicious software manipulating the Windows DNS cache.

Talking about security, preparing this post I’ve seen multiple articles article about blacklisting DNS domains using some huge hosts files. (Those can be converted to Bind zone files). I don’t use them, but it’s nice to know that exists.

Dig and nslookup own DNS Cache

The dig and nslookup commands are quite independent from Windows. These commands use their own DNS Cache, and they bypass the Windows DNS Cache.
For example. If Windows DNS Cache has already cached drupal.org (see with command ipconfig /displaydns), and you stop the DNS Cache Service, then dig drupal.org will not work. In the other hand, ping drupal.org will work, because ping will consult the Windows DNS Cache before hitting the DNS Server.

About your browser DNS Cache

When debugging issues about DNS, remember that your browser also stores internally the DNS lookups.
Normally a CTRL + F5 should be enough to clear.
This (one year old) chart shows you specific times:

Source: http://dyn.com/web-browser-dns-caching-bad-thing/.

About Fiddler

If you use fantastic tool Fiddler, be aware that has its own DNS Cache that will interfere with your tests. Look my Stackoverflow question, where Eric answered. After following that advice, it’s the most reliable tool I’ve found to inspect DNS lookups.

About Firebug

I wouldn’t rely on the DNS Lookup Time of the Network tab. Always is 0 ms, even when it takes several seconds for the DNS request.

About Navigation Timing API

Todo: Test accuracy of Navigation Timing API. I will update soon.

Extra: Resources.

The single best guide for BIND I found is the book Pro DNS and BIND, available for free, who has also installation guides for every OS, including Windows 7.


The most widely used Name Server Software

BIND is open source software that implements the Domain Name System (DNS) protocols for the Internet. It is a reference implementation of those protocols, but it is also production-grade software, suitable for use in high-volume and high-reliability applications.

BIND is by far the most widely used DNS software on the Internet, providing a robust and stable platform on top of which organizations can build distributed computing systems with the knowledge that those systems are fully compliant with published DNS standards.

Stop Block Port: Stop “System” process using port 80 [How To]

Running XAMPP or WAMP as local web servers is extremely useful to test websites, but sometimes it gets pretty annoying when other processes use port 80 (i.e. skype) so that Apache can’t start.
Recently I had the process “System” using that port, and I couldn’t help stopping it! Finilally google gave me the right solution:

You can set the IIS service to “start manually”, you can uninstall IIS from your computer, or you can change the port settings for the Default Web Site and any other sites you have set up on your computer via IIS.

Launch the IIS Manager console (Win+R, C:WindowsSystem32inetsrviis.msc) and expand your server (it’s your computer name) in the Connections panel on the left. In the expanded tree, select “Sites”, which will list all the sites set up in IIS. Chances are you’ll just have one, named “Default Web Site”.

Select the website from the list in the main pane, then click “Bindings…” in the Actions panel on the right-hand side of the IIS Manager. This will bring up a dialog box showing which methods can be used to view the website and how. You’ll want to select the one with “80″ in the Port column, and then click Remove. Close the dialog, and the site will no longer be accessible via port 80.



To find out which service is using port 80 do the following:

From a command prompt: Start | Run (type) cmd (click Ok) or Start > All Programs > Accessories > Command Prompt

Type the following and press enter:
netstat -b -a


I got the same problem, I couldn’t start localhost through Xampp and it shows error 503. But I have solved it by stopping service that use port 80 on IIS. Follow this:
1. Start
2. Right Click on My Computer
3. Click Manage
4. Click Service and Application
5. Click Internet Information Service (IIS) Manager
6. On Block IIS, find HTTP Redirect and HTTP Respond Header, stop that service by right clicking.
7. Try to start Apache through Xampp Control Panel again.

Hope it help.


Copy Folder from one Computer to other Computer in a Network

Step-1: Share the folder; say PC1\Backup

Step-2: “Map network Drive” the share folder; say as z: drive (PC1\Backup will be z: drive)

Step-3: Make backup.bat batch file

Step-4: Write the bellow code

@echo off
rem you could also remove the line above, because it might help you to see what happens

rem /i option is needed to avoid the batch file asking you whether destination folder is a file or a folder
rem /e option is needed to copy also all folders and subfolders
xcopy “d:\naz” “z:\foo” /i /e /y

Step-5: Now run the bat file or schedule the bat to auto execution



Windows 2000 and XP xcopy syntax

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U]
[/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1[+file2][+file3]…]

source Specifies the file(s) to copy.
destination Specifies the location or name of new files.
/A Copies only files with the archive attribute set, doesn’t change the attribute.
/M Copies only files with the archive attribute set, turns off the archive attribute.
/D:m-d-y Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
/EXCLUDE:file1 [+file2][+file3]… Specifies a list of files containing strings. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T.
/V Verifies each new file.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file, assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories.
/U Copies only files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only attributes.
/N Copies using the generated short names.
/O Copies file ownership and ACL information.
/X Copies file audit settings (implies /O).
/Y Suppresses prompting to confirm you want to overwrite an existing destination file.
/-Y Causes prompting to confirm you want to overwrite an existing destination file.
/Z Copies networked files in restartable mode.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.

An A-Z Index of the Windows CMD command line

   ADDUSERS Add or list users to/from a CSV file
   ADmodcmd Active Directory Bulk Modify
   ARP      Address Resolution Protocol
   ASSOC    Change file extension associations•
   ASSOCIAT One step file association
   AT       Schedule a command to run at a specific time
   ATTRIB   Change file attributes
   BCDBOOT  Create or repair a system partition
   BCDEDIT  Manage Boot Configuration Data
   BITSADMIN Background Intelligent Transfer Service
   BOOTCFG  Edit Windows boot settings
   BROWSTAT Get domain, browser and PDC info
   CACLS    Change file permissions
   CALL     Call one batch program from another•
   CERTREQ  Request certificate from a certification authority
   CERTUTIL Utility for certification authority (CA) files and services
   CD       Change Directory - move to a specific Folder•
   CHANGE   Change Terminal Server Session properties
   CHKDSK   Check Disk - check and repair disk problems
   CHKNTFS  Check the NTFS file system
   CHOICE   Accept keyboard input to a batch file
   CIPHER   Encrypt or Decrypt files/folders
   CleanMgr Automated cleanup of Temp files, recycle bin
   CLEARMEM Clear memory leaks
   CLIP     Copy STDIN to the Windows clipboard
   CLS      Clear the screen•
   CLUSTER  Windows Clustering
   CMD      Start a new CMD shell
   CMDKEY   Manage stored usernames/passwords
   COLOR    Change colors of the CMD window•
   COMP     Compare the contents of two files or sets of files
   COMPACT  Compress files or folders on an NTFS partition
   COMPRESS Compress individual files on an NTFS partition
   CON2PRT  Connect or disconnect a Printer
   CONVERT  Convert a FAT drive to NTFS
   COPY     Copy one or more files to another location•
   CSCcmd   Client-side caching (Offline Files)
   CSVDE    Import or Export Active Directory data 
   DATE     Display or set the date•
   DEFRAG   Defragment hard drive
   DEL      Delete one or more files•
   DELPROF  Delete user profiles
   DELTREE  Delete a folder and all subfolders
   DevCon   Device Manager Command Line Utility 
   DIR      Display a list of files and folders•
   DIRUSE   Display disk usage
   DISKPART Disk Administration
   DISKSHADOW Volume Shadow Copy Service
   DNSSTAT  DNS Statistics
   DOSKEY   Edit command line, recall commands, and create macros
   DriverQuery Display installed device drivers
   DSACLs   Active Directory ACLs
   DSAdd    Add items to active directory (user group computer) 
   DSGet    View items in active directory (user group computer)
   DSQuery  Search for items in active directory (user group computer)
   DSMod    Modify items in active directory (user group computer)
   DSMove   Move an Active directory Object
   DSRM     Remove items from Active Directory
   ECHO     Display message on screen•
   ENDLOCAL End localisation of environment changes in a batch file•
   ERASE    Delete one or more files•
   EVENTCREATE Add a message to the Windows event log
   EXIT     Quit the current script/routine and set an errorlevel•
   EXPAND   Uncompress files
   EXTRACT  Uncompress CAB files
   FC       Compare two files
   FIND     Search for a text string in a file
   FINDSTR  Search for strings in files
   FOR /F   Loop command: against a set of files•
   FOR /F   Loop command: against the results of another command•
   FOR      Loop command: all options Files, Directory, List•
   FORFILES Batch process multiple files
   FORMAT   Format a disk
   FREEDISK Check free disk space (in bytes)
   FSUTIL   File and Volume utilities
   FTP      File Transfer Protocol
   FTYPE    File extension file type associations•
   GETMAC   Display the Media Access Control (MAC) address
   GLOBAL   Display membership of global groups
   GOTO     Direct a batch program to jump to a labelled line•
   GPRESULT Display Resultant Set of Policy information
   GPUPDATE Update Group Policy settings
   HELP     Online Help
   HOSTNAME Display the host name of the computer
   iCACLS   Change file and folder permissions
   IF       Conditionally perform a command•
   IFMEMBER Is the current user a member of a Workgroup
   IPCONFIG Configure IP
   KILL     Remove a program from memory
   LABEL    Edit a disk label
   LOCAL    Display membership of local groups
   LOGEVENT Write text to the event viewer
   LOGMAN   Manage Performance Monitor
   LOGOFF   Log a user off
   LOGTIME  Log the date and time in a file
   MAPISEND Send email from the command line
   MBSAcli  Baseline Security Analyzer
   MEM      Display memory usage
   MD       Create new folders•
   MKLINK   Create a symbolic link (linkd) •
   MODE     Configure a system device
   MORE     Display output, one screen at a time
   MOUNTVOL Manage a volume mount point
   MOVE     Move files from one folder to another•
   MOVEUSER Move a user from one domain to another
   MSG      Send a message
   MSIEXEC  Microsoft Windows Installer
   MSINFO32 System Information
   MSTSC    Terminal Server Connection (Remote Desktop Protocol)
   MV       Copy in-use files
   NET      Manage network resources
   NETDOM   Domain Manager
   NETSH    Configure Network Interfaces, Windows Firewall & Remote access
   NETSVC   Command-line Service Controller
   NBTSTAT  Display networking statistics (NetBIOS over TCP/IP)
   NETSTAT  Display networking statistics (TCP/IP)
   NOW      Display the current Date and Time 
   NSLOOKUP Name server lookup
   NTBACKUP Backup folders to tape
   NTRIGHTS Edit user account rights
   OPENFILES Query or display open files
   PATH     Display or set a search path for executable files•
   PATHPING Trace route plus network latency and packet loss
   PAUSE    Suspend processing of a batch file and display a message•
   PERMS    Show permissions for a user
   PERFMON  Performance Monitor
   PING     Test a network connection
   POPD     Return to a previous directory saved by PUSHD•
   PORTQRY  Display the status of ports and services
   POWERCFG Configure power settings
   PRINT    Print a text file
   PRINTBRM Print queue Backup/Recovery
   PRNCNFG  Display, configure or rename a printer
   PRNMNGR  Add, delete, list printers set the default printer
   PROMPT   Change the command prompt•
   PsExec     Execute process remotely
   PsFile     Show files opened remotely
   PsGetSid   Display the SID of a computer or a user
   PsInfo     List information about a system
   PsKill     Kill processes by name or process ID
   PsList     List detailed information about processes
   PsLoggedOn Who's logged on (locally or via resource sharing)
   PsLogList  Event log records
   PsPasswd   Change account password
   PsPing     Measure network performance
   PsService  View and control services
   PsShutdown Shutdown or reboot a computer
   PsSuspend  Suspend processes
   PUSHD    Save and then change the current directory•
   QGREP    Search file(s) for lines that match a given pattern
   Query Process    Display processes (TS/Remote Desktop)
   Query Session    Display all sessions (TS/Remote Desktop)
   Query TermServer List all servers (TS/Remote Desktop)
   Query User       Display user sessions (TS/Remote Desktop)
   RASDIAL  Manage RAS connections
   RASPHONE Manage RAS connections
   RECOVER  Recover a damaged file from a defective disk
   REG      Registry: Read, Set, Export, Delete keys and values
   REGEDIT  Import or export registry settings
   REGSVR32 Register or unregister a DLL
   REGINI   Change Registry Permissions
   REM      Record comments (remarks) in a batch file•
   REN      Rename a file or files•
   REPLACE  Replace or update one file with another
   Reset Session  Delete a Remote Desktop Session
   RD       Delete folder(s)•
   RMTSHARE Share a folder or a printer
   ROBOCOPY Robust File and Folder Copy
   ROUTE    Manipulate network routing tables
   RUN      Start | RUN commands
   RUNAS    Execute a program under a different user account
   RUNDLL32 Run a DLL command (add/remove print connections)

   SC       Service Control
   SCHTASKS Schedule a command to run at a specific time
   SCLIST   Display Services
   SET      Display, set, or remove session environment variables•
   SETLOCAL Control the visibility of environment variables•
   SETX     Set environment variables
   SFC      System File Checker 
   SHARE    List or edit a file share or print share
   ShellRunAs Run a command under a different user account
   SHIFT    Shift the position of batch file parameters•
   SHORTCUT Create a windows shortcut (.LNK file)
   SHOWGRPS List the Workgroups a user has joined
   SHOWMBRS List the Users who are members of a Workgroup
   SHUTDOWN Shutdown the computer
   SLEEP    Wait for x seconds
   SLMGR    Software Licensing Management (Vista/2008)
   SOON     Schedule a command to run in the near future
   SORT     Sort input
   START    Start a program, command or batch file•
   SU       Switch User
   SUBINACL Edit file and folder Permissions, Ownership and Domain
   SUBST    Associate a path with a drive letter
   SYSTEMINFO List system configuration
   TAKEOWN  Take ownership of a file
   TASKLIST List running applications and services
   TASKKILL Remove a running process from memory
   TIME     Display or set the system time•
   TIMEOUT  Delay processing of a batch file
   TITLE    Set the window title for a CMD.EXE session•
   TLIST    Task list with full path
   TOUCH    Change file timestamps    
   TRACERT  Trace route to a remote host
   TREE     Graphical display of folder structure
   TSDISCON Disconnect a Remote Desktop Session
   TSSHUTDN Remotely shut down or reboot a terminal server
   TYPE     Display the contents of a text file•
   TypePerf Write performance data to a log file
   USRSTAT  List domain usernames and last login
   VER      Display version information•
   VERIFY   Verify that files have been saved•
   VOL      Display a disk label•
   WAITFOR  Wait for or send a signal
   WEVTUTIL Clear event logs, enable/disable/query logs
   WHERE    Locate and display files in a directory tree
   WHOAMI   Output the current UserName and domain
   WINDIFF  Compare the contents of two files or sets of files
   WINMSDP  Windows system report
   WINRM    Windows Remote Management
   WINRS    Windows Remote Shell
   WMIC     WMI Commands
   WUAUCLT  Windows Update
   XCACLS   Change file and folder permissions
   XCOPY    Copy files and folders
   ::       Comment / Remark•

Commands marked • are Internal commands only available within the CMD shell.
All other commands (not marked with •) are external commands.
External commands may be used under the CMD shell, PowerShell, or directly from START-RUN.