开发者

C++ script to “unlock” windows after being locked using “LockWorkStation()”

I have a C++ script that locks the windows when a specific event occurs. Locking windows is done using “LockWorkStation()” command. What I want to do is “unlock” win开发者_运维问答dows when some other event occurs. For the sake of argument, let’s assume windows is “locked”. I need windows to get unlocked after 2 minutes. Does this need any modification to MSGINA.dll ? or it is a simple command similar to LockWorkStation() ? Knowing that I have the username and password saved somewhere (currently on a US B stick that works as a key).

Any guidance, advice, or procedure to the direction to achieve the task is highly appreciated.

Regards


There is no supported mechanism to unlock workstation. You will have to write a custom GINA module and then communitate with it somehow.

With standard GINA the closest you can get is to do autologon (e.g. using Autologon tool from SysInternals). However autologon only kicks in after machine reboot or after user logoff, so user session would be lost.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜