Open the registry editor (REGEDIT.EXE) and navigate to the following directory:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\

Simply add a new string value, paste the full path to the executable in the name field (such as c:\windows\system32\cmd.exe), and then edit the value with ‘RUNASADMIN’.