如何在管理员模式下使用机器人框架执行cmd?

问题描述 投票:0回答:1

我需要将证书添加到存储中

机器人代码是

${result} 运行进程 certutil -addstore "Root" "C:\Users\Desktop\xyz.crt" shell=True。

日志 ${result.stdout}。

输出是需要管理员权限才能使用所选的选项。 使用管理员命令提示符来完成这些任务.CertUtil。请求的操作需要提升。

所以我需要使用特权模式运行过程中如何使用机器人frmaework实现

python robotframework
1个回答
1
投票

假设只有windows,试试这个

${result} Run Process runas /noprofile /user:<account with admin> <program that needs admin e.g. certutil>

© www.soinside.com 2019 - 2024. All rights reserved.