When you run a command prompt in Windows 7, it runs in user mode by default and does not have any administrator rights. If you need to execute commands as administrator from your user account, then you need to run the command prompt with administrator privileges.
An easy way to have access to the command prompt as administrator is to create a shortcut to the command prompt, and set it to run as administrator.
To create this shortcut, right-click on the desktop and select New | Shortcut from the pop-up menu.
On the Create Shortcut dialog box, enter the following text into the Type the location of the item edit box and click Next.
Enter a name for the shortcut, such as cmd, in the Type a name for this shortcut edit box and click Finish.
The shortcut is added to the desktop. Right-click on the shortcut and select Properties from the pop-up menu.
On the Properties dialog box, make sure the Shortcut tab is active and click the Advanced button.
The Advanced Properties dialog box displays. Click the Run as administrator check box to turn on that option and click OK.
When you double-click on the new shortcut to open a command prompt with administrator privileges, the following dialog box may display, warning you about running a program that will make changes to your computer. To continue opening the prompt, click Yes.
The command window opens with administrator rights, as shown in the title bar of the window.
NOTE: Any commands run in this command window will make changes to your computer as administrator, so be careful what you run in this window.
by Lori Kaufman