PDA

View Full Version : Lock XP Workstation Programmatically


Marcelo
December 5th 03, 08:07 PM
I'm developing a software to manage a Lan House. One of the issues I'm
struggling with is how to password lock the client workstation after
his time has expired. The first thing that came to my mind was to use
a screensaver, this approach works if the user is using 'normal'
desktop applications, but the screensaver is not activated if the user
is running a game like warcraft III or Counter Strike (the most played
games). Do any of you have an idea of what can I do to solve this
problem?

Thank you,
Marcelo.

Kadaitcha Man
December 5th 03, 08:08 PM
Marcelo > wrote:
> I'm developing a software to manage a Lan House. One of the issues I'm
> struggling with is how to password lock the client workstation after
> his time has expired. The first thing that came to my mind was to use
> a screensaver, this approach works if the user is using 'normal'
> desktop applications, but the screensaver is not activated if the user
> is running a game like warcraft III or Counter Strike (the most played
> games). Do any of you have an idea of what can I do to solve this
> problem?

<shakes head>

Torgeir Bakken (MVP)
December 5th 03, 08:08 PM
Marcelo wrote:

> I'm developing a software to manage a Lan House. One of the issues I'm
> struggling with is how to password lock the client workstation after
> his time has expired. The first thing that came to my mind was to use
> a screensaver, this approach works if the user is using 'normal'
> desktop applications, but the screensaver is not activated if the user
> is running a game like warcraft III or Counter Strike (the most played
> games). Do any of you have an idea of what can I do to solve this
> problem?

Hi

Try

%SystemRoot%\System32\rundll32.exe user32.dll,LockWorkStation

(same as Window Key-L). Note that the part after the comma is case sensitive.

--
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/scriptcenter

sqr
December 5th 03, 08:10 PM
Oh no not the windows -L key which someone in here says will not lock
windows.

--
Sqr
Overseer: alt.os.windows-xp
--

http://sqr.servebeer.com
ftp://sqr.myftp.biz


"Torgeir Bakken (MVP)" > wrote in message
...
> Marcelo wrote:
>
> > I'm developing a software to manage a Lan House. One of the issues I'm
> > struggling with is how to password lock the client workstation after
> > his time has expired. The first thing that came to my mind was to use
> > a screensaver, this approach works if the user is using 'normal'
> > desktop applications, but the screensaver is not activated if the user
> > is running a game like warcraft III or Counter Strike (the most played
> > games). Do any of you have an idea of what can I do to solve this
> > problem?
>
> Hi
>
> Try
>
> %SystemRoot%\System32\rundll32.exe user32.dll,LockWorkStation
>
> (same as Window Key-L). Note that the part after the comma is case
sensitive.
>
> --
> 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/scriptcenter
>
>

Andrew
December 5th 03, 08:13 PM
The command works but I have written a VB application around it for some of
my users who find it hard to CTRL ALT DEl and choose Lock Workstation

http://amharris.com/doc/LockScreen.exe

If this is what you need then maybe you could write it so it counts down?

"sqr" > wrote in message
...
> Oh no not the windows -L key which someone in here says will not lock
> windows.
>
> --
> Sqr
> Overseer: alt.os.windows-xp
> --
>
> http://sqr.servebeer.com
> ftp://sqr.myftp.biz
>
>
> "Torgeir Bakken (MVP)" > wrote in message
> ...
> > Marcelo wrote:
> >
> > > I'm developing a software to manage a Lan House. One of the issues I'm
> > > struggling with is how to password lock the client workstation after
> > > his time has expired. The first thing that came to my mind was to use
> > > a screensaver, this approach works if the user is using 'normal'
> > > desktop applications, but the screensaver is not activated if the user
> > > is running a game like warcraft III or Counter Strike (the most played
> > > games). Do any of you have an idea of what can I do to solve this
> > > problem?
> >
> > Hi
> >
> > Try
> >
> > %SystemRoot%\System32\rundll32.exe user32.dll,LockWorkStation
> >
> > (same as Window Key-L). Note that the part after the comma is case
> sensitive.
> >
> > --
> > 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/scriptcenter
> >
> >
>
>

Andrew
December 13th 03, 07:01 PM
The command works but I have written a VB application around it for some of
my users who find it hard to CTRL ALT DEl and choose Lock Workstation

http://amharris.com/doc/LockScreen.exe

If this is what you need then maybe you could write it so it counts down?

"sqr" > wrote in message
...
> Oh no not the windows -L key which someone in here says will not lock
> windows.
>
> --
> Sqr
> Overseer: alt.os.windows-xp
> --
>
> http://sqr.servebeer.com
> ftp://sqr.myftp.biz
>
>
> "Torgeir Bakken (MVP)" > wrote in message
> ...
> > Marcelo wrote:
> >
> > > I'm developing a software to manage a Lan House. One of the issues I'm
> > > struggling with is how to password lock the client workstation after
> > > his time has expired. The first thing that came to my mind was to use
> > > a screensaver, this approach works if the user is using 'normal'
> > > desktop applications, but the screensaver is not activated if the user
> > > is running a game like warcraft III or Counter Strike (the most played
> > > games). Do any of you have an idea of what can I do to solve this
> > > problem?
> >
> > Hi
> >
> > Try
> >
> > %SystemRoot%\System32\rundll32.exe user32.dll,LockWorkStation
> >
> > (same as Window Key-L). Note that the part after the comma is case
> sensitive.
> >
> > --
> > 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/scriptcenter
> >
> >
>
>

Google