Logon Script

By cterreforte ·
I want a script that appears when the user logs on that states a warning message and the user will have to click yes to get onto the desktop or if they click no it will log them out.

This conversation is currently closed to new comments.

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

All Answers

Collapse -

Try This.

by dan.cox In reply to Logon Script

You may need to modify it for exactly what you want to do and what message you want to display.

strSPMethod = MsgBox("Click Yes if you want to log in. Click No to log out:",260,"Login Script Message Box:")
If strSPMethod = 6 Then
WScript.Echo "Ok, you are now into the network!"

WScript.Echo "You are now being logged out."
Set WshShell=WScript.CreateObject("WScript.Shell") "shutdown.exe -R -F"

End If

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums