简体   繁体   English

在网络目录上以管理员身份运行批处理脚本

[英]Run batch script with admin right on network directory

On windows 7 I mount one network directory using "Right click on Computer" then "Connect a Network Drive". 在Windows 7上,我使用“右键单击计算机”然后“连接网络驱动器”安装一个网络目录。 After this, I want to execute a batch script using admin rights. 之后,我想使用管理员权限执行批处理脚本。 This script is on the Network Drive. 该脚本位于网络驱动器上。

So I just right-click on the batch script and I click on "Execute width admin right" but CMD opens and close with no message. 因此,我只在批处理脚本上单击鼠标右键,然后单击“对管理员执行宽度”,但是CMD打开并关闭,没有消息。 I think this is due to the that I have mounted the network drive without the admin rights but how can I do this? 我认为这是由于我已经安装了没有管理员权限的网络驱动器,但是我该怎么做呢?

NB: the script executes a few commands for installing a software that is on the network drive. 注意:该脚本执行一些命令来安装网络驱动器上的软件。

You don't really mount a share with 'admin rights'. 您并没有真正拥有“管理员权限”共享。 Your user account has whatever rights are granted to it by the server admin. 您的用户帐户具有服务器管理员授予的任何权限。 If you need 'execute' permissions for the share then the admin will have to grant your account that right. 如果您需要共享的“执行”权限,则管理员将必须向您的帐户授予该权限。 Alternately, you can mount the share using a different set of credentials that has the rights you need, which would have to be given to you by the admin. 或者,您可以使用一组具有所需权限的凭据来装载共享,而管理员必须将这些凭据授予您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM