在Windows11系统中,即使你是专业版系统下,并且使用了Administrator账户,在进行某些操作时还是需要弹出一个窗口来确定管理员权限,这就导致在程序开发的过程中很不方便,因为不是每个IDE都能时刻保持管理员权限。
所以打开运行,输入:
gpedit.msc
出现的界面中依次选择:
Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Option -> User Account Control: Run all administrators in Admin Approval …
这个选项一定要选择Disabled,这样就不用每次都弹出一个对话框来确定了。