Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <!--Removes all basic windows GUI functions such as Taskbar and close button -->
- <HTA:APPLICATION
- APPLICATIONNAME="LOGIN"
- VERSION="1.0"
- BORDER="none"
- INNERBORDER="no"
- CAPTION="no"
- SYSMENU="no"
- MAXIMIZEBUTTON="no"
- MINIMIZEBUTTON="no"
- ICON="NO"
- SCROLL="no"
- SCROLLFLAT="yes"
- SINGLEINSTANCE="yes"
- WINDOWSTATE="maximize"
- SHOWINTASKBAR="no"
- CONTEXTMENU="no"
- SELECTION="no"/>
- <script language="VBScript">
- On Error Resume Next
- Set objShell = CreateObject("WScript.Shell")
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set System = "HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Policies/System/"
- UserName = objShell.ExpandEnvironmentString("%USERNAME%")
- pathToDirectory = "/store/directory.txt"
- wasFound = false
- row = 0
- Version = "V1.0"
- Set dict = CreateObject("Scripting.Dictionary")
- Set directoryfile = fso.OpentextFile(pathToDirectory, 1)
- dim strComputer = "."
- dim wmiNS = "/root/cimv2"
- dim wmiQuery = "Select processID from win32_process where name = 'explorer.exe'"
- dim objWMIService
- dim colItems
- dim objItem
- dim strOUT
- Do Until directoryfile.AtEndOfStream
- line = file.Readline
- dict.Add row, line
- row = row + 1
- Loop
- file.Close
- For Each ln in dict.Items
- If ln = UserName Then
- wasFound = true
- End If
- Next
- If wasFound Then
- WScript.Quit()
- Else
- Call DisableTaskMgr
- Set objWMIService = GetObject("winmgmts:\\" & strComputer & wmiNS)
- Set colItems = objWMIService.ExecQuery(wmiQuery)
- For Each objItem in colItems
- objItem.terminate(1)
- Next
- End If
- sub DisableTaskMgr
- objShell.RegWrite System, "REG_SZ"
- objShell.RegWrite System & "/DisableTaskMgr", 1, "REG_DWORD"
- end sub
- sub EnableTaskMgr
- objShell.RegWrite System, "REG_SZ"
- objShell.RegWrite System & "/DisableTaskMgr", 0, "REG_DWORD"
- end sub
- sub RestartExplorerExe
- Dim obj
- Set obj = objWMIService.Get("win32_process")
- obj.Create("explorer.exe")
- end sub
- sub Logon
- Call EnableTaskMgr
- Set objFile = objFSO.CreateTextFile("store/" & LCase(UserName) & ".csv", ForWriting, True)
- Set ObjOpenFile = objFSO.OpenTextFile("store/" & UserName & ".csv")
- objFile.WriteLine(UserName & "," & Now & "," & Version)
- objFile.Close
- Set objFile.objFSO.OpenTextFile("store/directory.txt", 8, True)
- objFile.WriteLine(UserName)
- objFile.Close
- Call RestartExplorerExe
- end sub
- sub Logoff
- objShell.Run "shutdown /l"
- end sub
- </script>
- <style type="text/css">
- @font-face { font-family: MyriadPro; src: url(assets/MyriadPro-Regular.otf); }
- body {
- margin:40px;
- font-family: MyriadPro;
- }
- hr {
- margin-bottom:15px;
- height:1px;
- background-color: #004c99;
- }
- .title {
- margin-bottom:16px;
- font-size:18px;
- }
- img {
- width: 199px;
- height: 71.5px;
- margin-bottom: 250px;
- }
- .main_text {
- margin-bottom:20px;
- }
- .button {
- float: right;
- margin-left:10px;
- background-color:#00265D;
- border:1px solid #004c99;
- display:inline-block;
- color:#ffffff;
- font-family:arial;
- font-size:15px;
- font-weight:bold;
- padding:9px 25px;
- text-decoration:none;
- cursor:pointer;
- }
- </style>
- </head>
- <body>
- <img src="assets/generic.png" alt="Relevant Logo">
- <div class="title">Relevant End User Licence Agreement</div>
- <hr>
- <div class="main_text">
- By clicking "I Accept" below you agree to adhere to our End User Licence Agreement. Any breaking of the Terms Of Service held within the EULA
- are grounds for user account termination and will result in a disciplinary. The EULA <strong>must</strong> be accepted to use any Relevant network
- facilities and services.
- </div>
- <div class="main_text">
- By clicking "I Decline" you are declining our EULA and will be unable to use the Relevant network and you will be logged off the current computer.
- </div>
- <!-- <object data="EULA.pdf" type="application/pdf" width="100%" height="40%"></object> -->
- <hr>
- <div>
- <a href onClick="Logoff" class="button">I Decline</a>
- </div>
- <div>
- <a href onClick="Logon" class="button">I Accept</a>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement