Jackbox
Active Member
- Jan 2, 2016
- 197
- 96
- 74
Just a simple Acceptable Use Agreement Kiosk project in VB.NET --- easily configurable.
Note: You could add a way to terminate any other applications in focus aside from your own application. This would be most ideal for a kiosk, but this should do the trick in a typical deployment. Alt+Tab will still work so try to only have this app start on the account. On a dual screen setup, someone could Alt+Tab to an app, Alt+Space, Move... tap an arrow key and drag the app over to the secondary display.
Code:
Public Class frmLocker
'SETUP INSTRUCTIONS
'1. Change the businessName
'2. Change the agreementName
'3. On Form1.vb [Design], edit txtAgreement Text to contain your agreement. http://www.ala.org/advocacy/intfreedom/iftoolkits/litoolkit/internetusepolicies
'4. Compile and configure this to launch at login instead of explorer.exe ref: https://technet.microsoft.com/en-us/library/cc975911.aspx
'5. Disable taskmgr: User Configuration -> Policies -> Administrative template – > System -> Ctrl + Alt + Del – > Remove Task Manager (Enable)
Private Sub frmLocker_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim businessName As String
Dim agreementName As String
businessName = "Roger's Pizza Store" 'Modify the businessName to your organization's name.
agreementName = "Acceptable Use Agreement" 'See https://etc.usf.edu/techease/win/internet/what-is-an-acceptable-use-policy-aup/
Me.Text = businessName + Space(1) + agreementName
lblTitle.Text = businessName + Space(1) + agreementName
chkAgreement.Text = "I agree to the " + agreementName
Shell("cmd.exe /k taskkill /f /im explorer.exe && exit") 'We terminate explorer.exe in case we are a startup app.
End Sub
Private Sub chkAgreement_CheckedChanged(sender As Object, e As EventArgs) Handles chkAgreement.CheckedChanged
chkAgreement.Enabled = False
btnContinue.Enabled = True
btnContinue.Select()
End Sub
Private Sub btnContinue_Click(sender As Object, e As EventArgs) Handles btnContinue.Click
Dim RunExplorer As Process
RunExplorer = New Process()
RunExplorer.StartInfo.UseShellExecute = True
RunExplorer.StartInfo.CreateNoWindow = True
RunExplorer.StartInfo.FileName = "C:\Windows\explorer.exe"
RunExplorer.StartInfo.WorkingDirectory = Application.StartupPath
RunExplorer.Start()
End
End Sub
Private Sub frmLocker_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
e.Cancel = True
End Sub
End Class
Note: You could add a way to terminate any other applications in focus aside from your own application. This would be most ideal for a kiosk, but this should do the trick in a typical deployment. Alt+Tab will still work so try to only have this app start on the account. On a dual screen setup, someone could Alt+Tab to an app, Alt+Space, Move... tap an arrow key and drag the app over to the secondary display.
Attachments
Last edited: