Solved

Force use to accept computer policy before using computer

Posted on 2012-04-10
2
207 Views
Last Modified: 2012-05-07
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
0
Comment
Question by:Webcc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 47

Accepted Solution

by:
Martin Liss earned 250 total points
ID: 37830679
Try

If vbNo = msgbox("Please select yes to accept",vbyesno + vbsystemmodal,"Internet Disclaimer") Then

        Set oWS = CreateObject("WScript.Shell")
        oWS.Run "shutdown -L -F"
   
End If
0
 
LVL 65

Assisted Solution

by:RobSampson
RobSampson earned 250 total points
ID: 37831054
Hi, there's a couple of options here, although not fully fleshed out.
http://www.experts-exchange.com/Microsoft/Applications/Q_26983378.html

Regards,

Rob.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
In this post we will learn different types of Android Layout and some basics of an Android App.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question