2013-03-12 51 views
2

在运行perl脚本时,是否有任何方法可以在Win-7中获得管理员权限?在Win-7的perl脚本中获取管理员权限

+0

的可能的复制【如何提高使用UAC的Perl程序(HTTP:// stackoverflow.com/questions/11019571/how-to-elevate-perl-process-using-uac) – nwellnhof 2013-03-12 20:20:08

回答

1

如果你不介意运行整个脚本作为管理员,您可以使用shell“运行方式”命令:

runas /profile /env /user:mydomain\admin "perl myscript.pl" 
+0

是不是可以在运行时获得管理员权限(即在myscript.pl中) – hemanth 2013-03-12 08:18:32