+ Post New Thread
Results 1 to 9 of 9
Scripts Thread, AUP Script thats not quite good enough in Coding and Web Development; Here is my pop up vbs script for logins so that users have to accept our new policy at logon, ...
  1. #1

    Join Date
    Oct 2005
    Location
    Corpus Christi Sports College
    Posts
    153
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    AUP Script thats not quite good enough

    Here is my pop up vbs script for logins so that users have to accept our new policy at logon, if they refuse they are logged off. The slight problem is that users can continue working in the background and don't actually have to click yes on the policy.

    Code:
    Const EWX_LOGOFF   = 0
    Set obj = WScript.CreateObject("WScript.Shell")
    Set WshShell = CreateObject("WScript.Shell")
    
    intButton = WshShell.Popup ("Do you accept the user policy ? rest of policy to be added", , "Corpus Christi Catholic Sports College Student User Acceptability Policy", 4 + 32)
    
    Select Case intButton
    	Case 7
    		strMessage = "You have rejected the policy and will be logged off."
    		WshShell.Popup strMessage, 5 , "Corpus Christi Catholic Sports College Student User Acceptability Policy", 64
    
    	Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from 	Win32_OperatingSystem where Primary=true")
    
    	For Each OpSys In OpSysSet
    		OpSys.Win32Shutdown EWX_LOGOFF
    	Next
    
    End Select
    Anyone know if I can put a system pause/freeze into it so that no other programs in the background will work until yes/no is clicked ?

  2. #2

    Join Date
    Oct 2005
    Location
    West London
    Posts
    55
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: AUP Script thats not quite good enough

    You could try putting a timeout on it; this site may help: http://www.winguides.com/scripting/...

    Or using a system-modal message box instead of a popup. System modal means that everything else stops until the user responds.
    Hope this helps

  3. #3

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,689
    Thank Post
    756
    Thanked 1,715 Times in 1,526 Posts
    Rep Power
    438

    Re: AUP Script thats not quite good enough

    Going to get very annoying having to accept it every time.

    Can you not create a flag file in their my docs that it can check for so they only have to accept it once?

    Ben

  4. #4

    Join Date
    Oct 2005
    Location
    Corpus Christi Sports College
    Posts
    153
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: AUP Script thats not quite good enough

    I agree that it will be annoying, however a few years back when I was at college I had to click accept everytime. If a student who hasn't accepted, logs on as a student who has accepted, then the they will never need to accept, therefore they can lawfully claim they never broke the agreement.

    Any more advice about modal stuff, like an example script I can look over ?

  5. #5
    woody's Avatar
    Join Date
    Jun 2005
    Location
    Carlisle, Cumbria
    Posts
    624
    Thank Post
    3
    Thanked 21 Times in 17 Posts
    Rep Power
    24

    Re: AUP Script thats not quite good enough

    We have used Securus to do this. You can upload your own AUP to server and force everyone to Accept otherwise they are logged out. We don't have it running at the moment, but it does work well. A little slow on older PCs though which are slow to log on to begin with.

  6. #6

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,689
    Thank Post
    756
    Thanked 1,715 Times in 1,526 Posts
    Rep Power
    438

    Re: AUP Script thats not quite good enough

    answer=MsgBox("Hello everyone!",4096,"Example")

    The 4096 makes it a system modal box.

    Ben

  7. #7
    Irazmus's Avatar
    Join Date
    Feb 2006
    Location
    Suffolk
    Posts
    320
    Thank Post
    13
    Thanked 22 Times in 17 Posts
    Rep Power
    24

    Re: AUP Script thats not quite good enough

    @Pear: That may be true, but if they're logging on using an account other than their own then they are commiting an offence under section 1 of the computer misuse act (1990).

    Quote Originally Posted by http://www.opsi.gov.uk/acts/acts1990/Ukpga_19900018_en_1.htm
    1.—(1) A person is guilty of an offence if—

    (a) he causes a computer to perform any function with intent to secure access to any program or data held in any computer;

    (b) the access he intends to secure is unauthorised; and

    (c) he knows at the time when he causes the computer to perform the function that that is the case.

    (2) The intent a person has to have to commit an offence under this section need not be directed at—

    (a) any particular program or data;

    (b) a program or data of any particular kind; or

    (c) a program or data held in any particular computer.

    (3) A person guilty of an offence under this section shall be liable on summary conviction to imprisonment for a term not exceeding six months or to a fine not exceeding level 5 on the standard scale or to both.

  8. #8

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,819
    Thank Post
    881
    Thanked 685 Times in 454 Posts
    Rep Power
    505

    Re: AUP Script thats not quite good enough

    What about a KIX script?
    It processes everything before the user's desktop is loaded
    If they try to close the window - they are logged out.

  9. #9

    Join Date
    Oct 2005
    Location
    Corpus Christi Sports College
    Posts
    153
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: AUP Script thats not quite good enough

    Wouldn't know where to begin with KIX.

    Here is what I have now. It still lets users open programs before clicking yes, but it does stays in the foreground.

    Code:
    Const EWX_LOGOFF   = 0
    Set obj = WScript.CreateObject("WScript.Shell")
    Set WshShell = CreateObject("WScript.Shell")
    
    intButton = MsgBox("Do you agree to this policy ?", 4 + 32 + 4096 + 65536,"Corpus Christi Catholic Sports College Student User Acceptability Policy")
    
    Select Case intButton
    	Case 7
    		strMessage = "You clicked the cancel button."
    		WshShell.Popup strMessage, 5 , "Corpus Christi Catholic Sports College Student User Acceptability Policy", 64
    
    	Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from 	
    
    Win32_OperatingSystem where Primary=true")
    
    	For Each OpSys In OpSysSet
    		OpSys.Win32Shutdown EWX_LOGOFF
    	Next
    End Select



SHARE:
+ Post New Thread

Similar Threads

  1. Logon script & Printer script question.
    By Galway in forum Windows
    Replies: 3
    Last Post: 29th August 2007, 12:00 PM
  2. Is this good value?
    By Dos_Box in forum General Chat
    Replies: 4
    Last Post: 5th December 2006, 10:32 PM
  3. RM CC3 - any good?
    By katem in forum Wireless Networks
    Replies: 62
    Last Post: 20th October 2006, 10:51 PM
  4. This looks good
    By Dos_Box in forum General Chat
    Replies: 8
    Last Post: 9th May 2006, 12:36 PM
  5. CSE - Good or bad?
    By tarquel in forum Bad Experiences
    Replies: 2
    Last Post: 15th February 2006, 07:08 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •