使用管理员权限打开cmd(Windows 10) [英] open cmd with admin rights (Windows 10)

查看:312
本文介绍了使用管理员权限打开cmd(Windows 10)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有自己的python脚本,用于管理计算机上的IP地址。主要是在命令行(Windows 10)中执行netsh命令,该命令必须具有管理员权限。

I have my own python script that manages the IP address on my computer. Mainly it executes the netsh command in the command line (windows 10) which for you must have administrator rights.

这是我自己的计算机,我是管理员,运行时我已经使用管理员类型的用户(Adrian)登录了该脚本。

It is my own computer, I am the administrator and when running the script I am already logged in with my user (Adrian) which is of type administrator.

我无法使用右键单击并以管理员身份运行解决方案,因为我正在从python脚本执行netsh命令。

I can`t use the right click and "run as administrator" solution because I am executing my netsh command from my python script.

有人知道如何使用CMD的命令以管理员身份运行吗?

Anybody knows how to get "run as administrator" with a command from CMD ?

谢谢

推荐答案

尝试如下操作: runas / user:administrator regedit

这篇关于使用管理员权限打开cmd(Windows 10)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆