Schedule a task (see the "at" command) to, at specified times, run "net user
<username> /active:no" (or /active:yes as appropriate). Running "net help
user" will explain that command more fully. You might also consider
enforcing logon hours rather than periodically enabling/disabling the
account. [... Why? Scheduled tasks, for example, will not run if the
computer is off during the time the task is scheduled to run]
\\ MadDHatteR
"favor" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> hi all,
>
> I am new to batch files. I want to create a batch file in Win XP pro
> for autometically activating and deactivating an user account at
> scheduled days in the week. The program needs to run invisibly. How to
> do I do that?
>
> Thanks,
> favor
|