如何使Windows软件在脚本中以其他用户身份运行? [英] How can I make Windows software run as a different user within a script?

查看:374
本文介绍了如何使Windows软件在脚本中以其他用户身份运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个调用Wise的构建脚本来创建一些安装文件.问题在于,Wise许可证仅允许它在一个特定的用户帐户下运行,该帐户与我的构建脚本将在其下运行的帐户不同.我知道Windows具有 runas 命令,但这不适用于自动脚本,因为无法通过命令行输入密码.

I'm using a build script that calls Wise to create some install files. The problem is that the Wise license only allows it to be run under one particular user account, which is not the same account that my build script will run under. I know Windows has the runas command but this won't work for an automated script as there is no way to enter the password via the command line.

推荐答案

这可能会有所帮助:为什么RunAs程序不能在命令行上接受密码?

这篇关于如何使Windows软件在脚本中以其他用户身份运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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