Due to the restrictions placed in Registry when you attempt to run CMD.exe or a batch file, you may receive the message "The command prompt has been disabled by your administrator". Try the below step to solve the problem.
- Open Registry Editor (Regedit.exe) and navigate to:[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System]
- In the right-pane, double-click DisableCMD and set its data to 0
Click Start, Run and type or copy this command exactly as given below then click on ok.
REG add HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /t REG_DWORD /d 0 /f