This HTA Script will allow you to see your local computer and logged on user account Organization (OU) Information.
HTA Script:
Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
objExplorer.Navigate "About:Blank"
objExplorer.Document.Title = "Created By Don Hite For myITforum.Com"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Visible = 1
strHTML = "<table border='1' style='border-collapse: collapse' bordercolor='SaddleBrown' id='Table1' >"
strHTML = strHTML & "<tr>"
strHTML = strHTML & "<td width='10%' bgcolor = 'SeaShell'><font color = 'Blue'><b>Computer</td>"
strHTML = strHTML & "<td width='10%' bgcolor = 'SeaShell'><font color = 'Blue'><b>User</td>"
strHTML = strHTML & "</tr>"
Set objSysInfo = CreateObject("ADSystemInfo")
strComputerName = objSysInfo.ComputerName
Set objComputer = GetObject("LDAP://" & strComputerName)
strOUName = objComputer.Parent
Set objOU = GetObject(strOUName)
strHTML = strHTML & "<td width='10%'>" & objOU.distinguishedName & "</td>"
strUserName = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUserName)
strOUName = objUser.Parent
strHTML = strHTML & "</table>"
strHTML = strHTML & "<p align='center'> <font color='Blue'>Please Visit myITforum.Com</p>"
objExplorer.Document.Body.BgColor = "CornSilk"
objExplorer.Document.FgColor = "SaddleBrown"
objExplorer.Document.Body.InnerHTML = strHTML
No Comments