本文介绍了在Windows 07中从excel VBA以管理员模式打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有按钮的excel文件.如果单击该按钮,则应该可以在其他位置的ADMINISTRATOR模式下打开文件"myfile.exe".

I have a excel file which has a button in it.if i click on the button,i should be able to open a file "myfile.exe" in an ADMINISTRATOR mode which is in different location.

有人可以帮助我如何在Windows07计算机上使用excel VBA来实现这一目标吗??

could someone please help me how this could be implemented using excel VBA in Windows07 machine...?

提前谢谢....

推荐答案

是的,您可以使用 runas 进行操作,但需要输入密码.

Yes you can do it using runas but you need to have the password for it.

Shell "runas /profile /env /user:=<UserName>\admin ""c:\windows\Notepad.exe"""

快照

有关RunAs的帮助:在DOS提示符下键入 runas/?以查看语法.

Help on RunAs: type runas/? in DOS prompt to see the syntax.

这篇关于在Windows 07中从excel VBA以管理员模式打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 22:19