Link to home
Start Free TrialLog in
Avatar of Webcc
WebccFlag for United States of America

asked on

Force use to accept computer policy before using computer

Trying to write a computer usage policy in vbscript whereby a user would have to click yes to accept before using the computer.  Trying to lock the computer until the message is responded to.  VBSYSTEMMODAL is not working and I cannot just exit out of the IF statement if they click yes.   Here is my code so far:

wscript.echo("Internet Use Disclaimer: The Library is responsible only for those pages bearing the name. The Internet is a global collection of computer networks that connects thousands of computers worldwide some of which may contain controversial or offensive material. The Internet contains many valuable sources of information, but not all sites are accurate, complete, or up-to-date, and there are sites which some users may consider controversial, offensive or inappropriate. The library does not monitor and has no control over the information accessed through the Internet and cannot be held responsible for its content.")  
      answer = msgbox("Please select yes to accept",vbyesno + vbsystemmodal,"Internet Disclaimer")
      
          
If Answer = vbYes Then
        Exit 0
    Else
        Set oWS = CreateObject("WScript.Shell")
        oWS.Run "shutdown -L -F"
   
End If
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial