The easiest way to undo a very recent change is almost always restoring the system to a previous state.
If that's not an option (e.g., if there's no recent restore point), you should be able to undo these changes manually, as detailed below.
I have a Run command box link in the Start menu. Today when I booted my PC, that run command was missing.
To undo this change, right-click the Start button, go to Properies → Start Menu → Customize... and make sure the option Run command is checked. Then, click OK twice.
A message box returned:
This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.
The NoRun value in the Software\Microsoft\Windows\CurrentVersion\Policies\Explorer keys of the HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER hives determine whether you can or cannot access the Run dialog:
- If
NoRun is set to 1 in HKEY_LOCAL_MACHINE, you cannot.
- If
NoRun is set to 0 in HKEY_LOCAL_MACHINE, you can.
- If
NoRun is missing in HKEY_LOCAL_MACHINE, the corresponding setting in HKEY_CURRENT_USER decides. The latter has no effect if the first is present.
To remove the restriction from any user account, do the following:
Log into an Administrator account.
Press Win + E to open Windows Explorer.
Open the System32 folder (usually C:\Windows\System32).
Search for cmd.exe, right-click it and click Run as administrator.
Execute the following command:
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoRun /t REG_DWORD /d 0 /f
Then,
to remove the restriction only from the current user account, execute the following command:
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoRun /t REG_DWORD /d 0 /f
to remove the restriction from a different user account, find out its SID by executing the following command:
wmic useraccount get name,sid
Afterwards, execute
reg add HKU\<SID>\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoRun /t REG_DWORD /d 0 /f
where <SID> is the user account's SID.
to remove the restriction from all existing users accounts, execute the following commands:
for /f "tokens=1,2" %a in ('wmic useraccount get name^,sid') do @if not %a==Name if not "%b"=="" reg add HKU\%b\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoRun /t REG_DWORD /d 0 /f 2>nul
Reboot your computer to make the changes take effect.
If you can't perform any of the steps, try disabling UAC or booting in safe mode.
If the problem persists after following these steps, execute
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoRun
reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoRun
to check if the registry values are still set to 0.
If they aren't, I recommend reading Computer is infected by a virus or a malware, what do I do now?.