蝙蝠运行作为当前用户 [英] Run bat as current user
问题描述
让我们说,我打开它打开2.bat我想3.bat与登录用户当前的权限打开,不提示密码1.BAT
编辑:我忘了告诉1.BAT下系统运行
Lets say that i open 1.bat which opens 2.bat i want the 3.bat to open with rights of the user current logged in and doesn't prompt for password i forgot to tell that 1.bat runs under system
推荐答案
如果用户运行1.BAT和1.BAT运行2.bat和2.bat运行3.bat,然后3.bat会运行被执行1.BAT的用户帐户。有没有必要做任何的不同。
If the user runs 1.bat, and 1.bat runs 2.bat, and 2.bat runs 3.bat, then 3.bat will run as the user account that executed 1.bat. There is no need to do anything different.
编辑:由于问题是,1.BAT是跑了作为系统,那么这个变化的东西。
Since the problem is that 1.bat is ran as system, then this changes things.
试试这个想法。使用 runas命令。现在,会提示你输入密码,但我敢打赌,你可以解决这个由<一个href=\"http://stackoverflow.com/questions/2075399/send-text-to-standard-input-of-a-windows-console-app\">echoing您的密码标准输入文本。
Try this idea. Use the runas command. Now, that will prompt you for a password, but I bet you could get around this by echoing the text of your password to the standard input.
这篇关于蝙蝠运行作为当前用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!