Since windows Vista and Windows 2008 when performing some system tasks in command prompt ,
you must run CMD with administrative privileges.

To do that navigate to All Programs>Accessories right click on Command Prompt and chose “Run as administrator”
Run as administrator

You can chose Command Prompt to run always with administrative privileges.
To do that navigate to All Programs>Accessories right click on Command Prompt and chose “Properties”
Under properties navigate to “shortcut” and press advanced
Select Run as Administrator and OK.

CMD as Administrator

From now CMD will run always as Administrator