General discussion

Locked

Stop users closing the logon script

By Chud ·
Anyone know a handy way (apart from casual workplace violence) of stopping users from prematurely closing down their logon scripts?

e.g. a command at the beginning of the script to reboot the machine in x seconds if a counter command (at the end of the script) is not run.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Stop users closing the logon script

by TimTheToolMan In reply to Stop users closing the lo ...

Hi,

Its a bit clunky and subject to hacking if the user knows what to do, but you could do an "at" command as the first line of the script to run a batch file in say 1 min that does a "logoff" if a flag file wasn't found... and then delete the flag file.

The logon script obviously creates the flag file at the end...

The tricky bit of this is to calculate the time for the "at" command to run at.

E:\Documents and Settings\Tim Medhurst>time /t
03:16 AM

E:\Documents and Settings\TimMedhurst>time /t > temp.txt

E:\Documents and Settings\Tim Medhurst>for /F "tokens=1,2 delims=: " %i in (temp
.txt) do echo %i %j

E:\Documents and Settings\Tim Medhurst>echo 03 16
03 16

...returns the hours and minutes. Obviously you need to add two to the minutes and recalculate for overflows, but I dont want to leave nothing for you to do...;-)

Cheers,
Tim.

Collapse -

Stop users closing the logon script

by Chud In reply to Stop users closing the lo ...

Poster rated this answer

Collapse -

Stop users closing the logon script

by Joseph Moore In reply to Stop users closing the lo ...

Something else you can try is outlined in the Technet article How to Hide the Logon Script Dialog Box on a Windows Client (Q176197):
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q176197
(please remove any spaces)

hope this helps

Collapse -

Stop users closing the logon script

by Chud In reply to Stop users closing the lo ...

Poster rated this answer

Collapse -

Stop users closing the logon script

by Chud In reply to Stop users closing the lo ...

This question was closed by the author

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums