使用 JScript (WSH) 刷新/重新启动 Vista 的图形登录屏幕

发布于 2024-08-12 08:37:26 字数 633 浏览 3 评论 0原文

背景: 我有一个在计算机启动时运行的 JScript(从任务计划程序)。该脚本发挥了一些作用,并确定是否应该允许用户登录。它首先禁用所有用户帐户,然后如果允许用户使用,则通过使用 wshShell.Exec() 触发“net user”命令来启用用户帐户。所有这些都运行良好,并且帐户已正确启用/禁用。

问题: 然而,vista 图形登录屏幕不知道用户帐户已启用/禁用,并且不会自行刷新以显示/删除用户帐户图片。实际上,如果我在登录屏幕上等待足够长的时间来启动屏幕保护程序,它会自行刷新。当鼠标移动时,签证登录屏幕将刷新。不过,我希望能够从我的脚本重新启动/刷新登录屏幕。有什么想法吗?

我已经尝试过的:

  1. 我尝试从以下位置启动 winlogon.exe 脚本,它没有效果
  2. 我尝试从脚本启动 logon.scr 手动触发屏幕保护程序, 它没有触发。

如果您需要该脚本,请查看此处:http://code.google.com/p/truecryptautomount/

Background:
I have a JScript that runs when the computer starts up (from task scheduler). The script does some magic and determines if a user should be allowed to login at all. It starts by disabling all user accounts and then if a user is to be allowed in it enables the users account by firing the 'net user' command using wshShell.Exec(). All this works well and the accounts are correctly enabled/disabled.

Problem:
However the vista graphical login screen has no idea that user accounts have been enabled/disabled and does not refresh itself to show/remove the user account pictures. Actually it does refresh itself if I wait long enough at the login screen to start the screensaver. When the mouse is then moved the visa login screen returns refreshed. However I want to be able to restart/refresh the login screen from my script. Any ideas?

What I have already tried:

  1. I tried launching winlogon.exe from
    the script, it had no effect
  2. I tried launching logon.scr from the ecript
    to trigger the screensaver manually,
    it did not trigger.

If you need the script, look here: http://code.google.com/p/truecryptautomount/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

辞慾 2024-08-19 08:37:26

您在服务上下文中执行的任何操作都不会影响它,因为登录屏幕是完全不同的会话/桌面。这是一项安全功能,旨在阻止用户程序模拟登录屏幕来捕获密码。 CTRL+ALT+DEL 将始终将您带到此备用桌面/会话。

您正在启动的屏幕保护程序与您在登录屏幕上看到的屏幕保护程序不同。考虑到这一点,您应该能够为系统帐户的配置文件配置屏幕保护程序,以使其等待时间非常短。您可能可以从本文中了解您需要了解的内容:

http://blogs.technet.com/heyscriptingguy/archive/2006/03/08/how -can-i-configure-the-screensaver-used-when-no-one-is-logged-on-to-a-computer.aspx

希望这有帮助,

-Oisin

Anything you do from the service's context will not affect it as the login screen is an entirely different session/desktop. This is a security feature designed to stop user programs from emulating the login screen to capture a password. CTRL+ALT+DEL will always bring you to this alternate desktop/session.

The screensaver you are starting is not the same one you see start on the login screen. With that in mind, you should be able to configure the screensaver for the system account's profile to have a very short wait time. You can probably learn what you need to know from this article:

http://blogs.technet.com/heyscriptingguy/archive/2006/03/08/how-can-i-configure-the-screensaver-used-when-no-one-is-logged-on-to-a-computer.aspx

Hope this helps,

-Oisin

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文