Question Locked
0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
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.
2 replies
by cterreforte Accepted solution
Clarifications
by dan.cox Accepted solution
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!"
Else
WScript.Echo "You are now being logged out."
Set WshShell=WScript.CreateObject("WScript.Shell")
WshShell.run "shutdown.exe -R -F"
End If
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
Discussion Locked
What Makes a Business Website Effective in 2026
2 helpful
10 replies
1 helpful
3 replies
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply
Question Unanswered
Best Way to Make Long WordPress Location Guides Mobile Friendly
0 helpful
0 replies
Discussion
Optimizing WordPress widgets and DOM size
0 helpful
3 replies