Could not run Command Prompt (CMD)
There are two possible reasons why CMD.EXE couldn’t run in Microsoft Windows 7. This may be cause of malware infections or caused by windows policies.
Infection from malware. If you have encountered some virus infection or malware infections before and have already clean or removed the virus from your system, its effect will still remain. This effect cause is what we called the scar of virus infection. Some viruses or malware changed settings in our operating system such as changing policies, hiding folders and files, disable administrative functions, disabling registry editing, changing folders to application and many more. Where this action made by the virus couldn’t fixed by anti-virus software or malware removal tool. What we need is to find tweaks or manually fixed our system.
On Windows Client TechCenter (Microsoft Technet) the same problem was posted and posted a solution as follows by Thomas_77:
This problem may be also caused by the policies keys. You can use the followling method to remove the policies keys:
Remove Group Policy
1. Click Start, type REGEDIT in the Start Search bar and press Enter.
2. Locate the following key in the left pane:
[HKEY_LOCAL_MACHINESoftwarePoliciesMicrosoft]
3. Highlight “Microsoft” folder and click "Delete".
4. Repeat to delete the following keys:
[HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionPolicies
[HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionGroup Policy]
[HKEY_CURRENT_USERSoftwarePoliciesMicrosoft]
[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionGroup Policy]
[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPolicies
If some keys do not exist, please ignore them.
If the issue persists, you can run an in-place upgrade to repair the system.
In-place Upgrade
1. Insert the Windows 7 DVD in the computer's DVD drive.
2. Click Start and choose Computer.
3. Please find the "setup.exe" file in the DVD-ROM and double click it.
4. Click Install now.
5. When we are prompted to input the product key, please click Next without inputting any key. The setup wizard will prompt and ask if you agree to install Windows Vista without the key. Please choose to confirm.
6. When you reach the "Which type of installation do you want" screen, click Upgrade to upgrade the system files of Windows 7.
He also posted the following as a second choice:
Have you tired the following method:
1. Run CMD.exe
2. Open Task manager, in Application tab, right click the CMD icon and click Maximize. If this does not help, click Switch to.
If the issue persists, we can use powershell instead of CMD. Powershell is more powerful than CMD.
How to run powershell
1. Click the Start button, then in the "Start Search" box, type powershell but DO NOT press Enter yet.
2. In the list above, under "Programs" right-click on CMD that appears above and choose "Run as Administrator".
3. In the open window, type the command you want to run.
You make take his advice but please take it at your own risk. Deleting registry keys may cause damage to your system.
In my case, I made a solution or a tweak for this problem. Here they are:
-
Create a new user account with Administrator privilege;
-
Create a short-cut on desktop then run as administrator.
Create a New User Account. Creating new user account may create new policies for the new created account which is different from the current account where you can not run the CMD at the run command. After creating new User Account just give a try to run the CMD command and you will notice a label “Administrator: cmd” on the title bar of the executed CMD command. This means that the CMD command is running under Administrator account.
Create Short-Cut on the Desktop. This method should be done under the account where you cannot run the CMD command. Create and CMD shortcut on the desktop by right clicking on the desktop then select new on the menu then shortcut. Type “cmd.exe” on the wizard and then click next, type the short cut label or just leave it the same then click finish. On the desktop where your shortcut is created, right click on the CMD shortcut then select Run as administrator.
You may also do this to avoid right click then run as administrator on the next time by setting the shortcut properties.
Right click on the shortcut, select properties on the menu, click the shortcut tab, click advance.
On the advanced property dialog box check the Run as administrator check box then click Ok then click another OK on the Property dialog box. To run the CMD, just double click on the shortcut.