Dim objIE Set objIE=WScript.CreateObject("InternetExplorer.Application","IE_") blnRunning=True With objIE .width=600 .height=300 .statusbar=False .menubar=False .toolbar=False .navigate ("about:Blank") End With Do While blnRunning WScript.Sleep 100 Loop strMsg="Have a nice day" MsgBox strMsg,vbOKOnly+vbInformation,"Welcome" WScript.quit Sub IE_NavigateComplete2(IDispatch,strRet) 'quit the script if the user uses the IE window 'to navigate anywhere If strRet<>"about:Blank" Then objIE.Quit strMsg="Browsing not allowed" MsgBox strMsg,vbOKOnly+vbCritical,"Sorry.." Exit Sub End If Set objNetwork=CreateObject("WScript.Network") strText=objNetwork.ComputerName & VbCrLf strText=strText & UCase(objNetwork.UserName) & VbCrLf Set colDrives = objNetwork.EnumNetworkDrives If colDrives.Count = 0 Then strText=strText & "There are no mapped drives to enumerate." &_ VbCrLf Else strText = strText & "Current network drive connections: " For i = 0 To colDrives.Count - 1 Step 2 strText = strText & VbCrLf & vbtab & colDrives(i) &_ vbTab & colDrives(i + 1) Next End If strText=strText & VbCrLf Set colPrint = ObjNetwork.EnumPrinterConnections If colPrint.Count = 0 Then strText=strText & "There are no printers to enumerate." &_ VbCrLf Else strText = strText & "Current Printer connections: " For i = 0 To colPrint.Count - 1 Step 2 strText = strText & vbCRLF & vbtab & colPrint(i) &_ vbTab & colPrint(i + 1) Next End If objIE.Document.body.InnerText=strText objIE.visible=True End Sub Sub IE_OnQuit() blnRunning=False End Sub