以编程方式自动填充 UAC 详细信息
有没有办法通过编程方式在 Visa 中自动填写 UAC 登录名和密码?
例如,出现UAC提示。 您的程序会自动为您填写该信息。
例如,一个程序会在 UAC 提示符中使用管理员用户名和密码自动填充该信息。
SendKeys 无法将输入键发送到 UAC 对话框
Is there a way to, via programmatically, auto-fill in the UAC login name and password in Visa?
For instance, the UAC prompt comes up.
Your program auto-fills that information for you.
E.g., a program that would auto-fill that information with an administrator username and password in the UAC prompt.
SendKeys does not work to send input keys to the UAC dialog box
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
UAC 有多个级别。我相信如果您使用带有“灰色”屏幕的 UAC,您想要的东西是不可能的。此模式专门用于不允许允许其他程序访问 UAC 窗口。
There are several levels of UAC. I believe what you want is not possible if you use the UAC with the "greyed" screen. This mode is there to specifically not allow other programs access to the UAC-Window.
如果您以管理员身份登录计算机,则无需提供 ID 和密码,只需单击“同意”即可。如果您有不以管理员身份登录的好习惯,那么您现在可以放松这个习惯,因为 UAC 可以防止您的管理权限在您不知情的情况下被使用。
If yu're logged into the machine as an administrator, you don't need to provide an ID and password, just click Consent. If you have the good habit of not signing on as an administrator, you can relax that habit now because UAC prevents your admin powers being used without your knowledge.
你为什么要这样做?
您希望您正在创建的程序绕过 UAC 吗?如果是这样,您应该重写您的程序以需要较少的提升权限。
如果您希望这样做以免受到 UAC 的困扰,可以在控制面板中将其关闭。搜索“UAC”。
最后,如果您想要 UAC 但又希望能够快速输入您的凭据,我建议您使用 AutoHotkey。该程序有一个记录功能,您可以使用它来创建一个宏,每次您按下指定的热键时,该宏都会在 UAC 窗口中填写您的凭据。
Why are you looking to do this?
Do you wish to have a program you're creating bypass UAC? If so, you should rewrite your program to require less elevated privileges.
If you're looking to do this so that you're not bothered with UAC, you can turn it off in the control panel. Search "UAC".
Finally, if you want UAC but you want to be able to quickly enter your credentials I would suggest AutoHotkey. That program has a record function which you could use to create a macro that would fill in your credentials in the UAC window every time you press the designated hotkey.