When running cmd on Windows 11, the home version of the laptop, win+r does not have administrator rights by default. How can I adjust it to have administrator rights?

I don't know what happened to Huawei's matebookeGo laptop some time ago. When I opened the run box, the line "Create this task with administrative rights" was missing, and the cmd was no longer under the default administrator. This was very inconvenient, although every time win+r, after entering cmd, you can press ctrl+shit+enter to run with administrator privileges, but sometimes I always forget how to change it to the default mode.

First run gpedit.msc. The computer must have the "Local Security Policy Group" option. If not, run

::----------------------------------------------------
@echo off
 
pushd "%~dp0"
 
dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
 
dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
 
for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"C:\Windows\servicing\Packages\%%i"
 
pause
::----------------------------------------------------

Open local security policy:

Open the run window (WIN+R) and enter:

secpol.msc, or gpedit.msc


Select: Security Settings --> Local Policies --> Security Options:

Set "User Account Control: Run all administrators in administrator approval mode" to "Prohibited" 

 After restarting, the icon appeared 

Guess you like

Origin blog.csdn.net/babytiger/article/details/132684938