First of all I want to limit one users access on a stand alone PC. I set the
login time window with the NET USER command which indeed limits login.
However, it doesn't force logout after exceeding login time frame.

Now I want to schedule a script that warns the user that a logoff will
occur, and thereafter loggs off the current user.

I can create messages in VBScript but my questions are these:
How can I identify the current logged on user and compare this with a
constant?
How can I execute the shutdown program since Shell doesn't work in
scripting?

Many thanks.

Re: Execute program by Brian

Brian
Wed Apr 06 11:15:43 CDT 2005

Alejandro wrote:
> First of all I want to limit one users access on a stand alone PC. I set the
> login time window with the NET USER command which indeed limits login.
> However, it doesn't force logout after exceeding login time frame.
>
> Now I want to schedule a script that warns the user that a logoff will
> occur, and thereafter loggs off the current user.
>


Type the following at the command line:

net help accounts

and check out the /FORCELOGOFF option.

Re: Execute program by Alejandro

Alejandro
Wed Apr 06 14:11:46 CDT 2005

I tried this option, both NET ACCOUNTS /FORCELOGOFF:0 and NET ACCOUNTS
/FORCELOGOFF:5 but nothing happened at the expiration time. Is this supposed
to work on a standalone (no domain) WXP machine?

"Brian Wolven" <brian.wolven@domain.invalid> schreef in bericht
news:%23RiNjPsOFHA.2252@TK2MSFTNGP15.phx.gbl...
> Alejandro wrote:
>> First of all I want to limit one users access on a stand alone PC. I set
>> the login time window with the NET USER command which indeed limits
>> login. However, it doesn't force logout after exceeding login time frame.
>>
>> Now I want to schedule a script that warns the user that a logoff will
>> occur, and thereafter loggs off the current user.
>>
>
>
> Type the following at the command line:
>
> net help accounts
>
> and check out the /FORCELOGOFF option.



Re: Execute program by Jerold

Jerold
Wed Apr 06 12:46:40 CDT 2005

On Wed, 6 Apr 2005 22:31:18 +0200, "Alejandro" <alejandro@lycos.nl> wrote:

>First of all I want to limit one users access on a stand alone PC. I set the
>login time window with the NET USER command which indeed limits login.
>However, it doesn't force logout after exceeding login time frame.
>
>Now I want to schedule a script that warns the user that a logoff will
>occur, and thereafter loggs off the current user.
>
>I can create messages in VBScript but my questions are these:
>How can I identify the current logged on user and compare this with a
>constant?
>How can I execute the shutdown program since Shell doesn't work in
>scripting?
>
>Many thanks.
>

See tip 9159 and 8768 in the 'Tips & Tricks' at http://www.jsifaq.com
for a Microsoft and JSI solution respectively, both free.


Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com