Hello there
is there a way to unlock a machine programmatically ?
same as using rundll32.exe user32.dll,LockWorkStation for lock it?
Regards
Sameh

Re: unlock machine programmatically by Torgeir

Torgeir
Mon Jul 19 13:26:27 CDT 2004

Sameh Ahmed wrote:

> Hello there
> is there a way to unlock a machine programmatically ?
> same as using rundll32.exe user32.dll,LockWorkStation for lock it?
Hi

You will need to write your own gina dll to be able to do this:

WlxWkstaLockedSAS
http://msdn.microsoft.com/library/en-us/security/security/wlxwkstalockedsas.asp

Interaction Between Winlogon and GINA
http://msdn.microsoft.com/library/en-us/security/security/interaction_between_winlogon_and_gina.asp

Gina Sample: Graphical Identification and Authentication DLL
http://msdn.microsoft.com/library/en-us/vcsample98/html/vcsmpginasample.asp


A *crude* workaround with a script solution:

Let the script start with configuring an autologon and then a
*forced* reboot (a.k.a. "boot even if there are unsaved documents")
of the computer (that will boot the computer even if it is locked).

Then the computer will do an automatic logon, and the computer is
not locked anymore and you can continue with your procedure.


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/community/scriptcenter/default.mspx