使用管理员权限打开cmd(Windows 10)

编程入门 行业动态 更新时间:2024-10-27 14:24:28
本文介绍了使用管理员权限打开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)

本文发布于:2023-11-10 01:48:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1574021.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:管理员权限   cmd   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!