Beruflich Dokumente
Kultur Dokumente
A useful hta to which can be put on an intranet or modified into a html form
When the user runs the hta say from a url link on an intranet page it automatically
queries wmi info and appends the user’s computername, username, computer
manufacturer and model into an email to be sent to IT
Copy into notepad modify with your domain info and save with a file extension .HTA
--------------------------------------------------------------------------------------------------------------------------------------
<head>
<title>Email to IT</title>
<HTA:APPLICATION
APPLICATIONNAME="Email to IT"
BORDER="1"
CAPTION="YES"
MAXIMIZEBUTTON="NO"
MINIMIZEBUTTON="YES"
SCROLL="YES"
SHOWINTASKBAR="YES"
SINGLEINSTANCE="yes"
SYSMENU="YES"
WINDOWSTATE="NORMAL"
>
</head>
filter:progid:DXImageTransform.Microsoft.Gradient
<SCRIPT Language="VBScript">
strModel = objComputer.Model
strManufacturer = objComputer.Manufacturer
Next
Sub Window_Onload()
SetLocalUseInfo()
End Sub
End Sub
Sub SetLocalUseInfo()
spn_ComputerID.InnerText = objWSHNetwork.ComputerName
spn_Manufacturer.InnerText = strManufacturer
spn_Model.InnerText = strModel
End Sub
Sub btn_Submit_onClick()
End Sub
With objEmail
.From = FromAddress
.To = ToAddress
.Subject = MsgSubject
.HTMLbody = MsgBody
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/
smtpserver") = "MY_SMTP_RELAY"
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/
smtpserverport") = 25
.Configuration.Fields.Update
.Send
End With
End Sub
</SCRIPT>
</head>
<hta:application
applicationname="Incident"
border="dialog"
borderstyle="normal"
caption="yes"
contextmenu="yes"
icon="no.ico"
maximizebutton="yes"
minimizebutton="yes"
navigable="yes"
scroll="yes"
selection="yes"
showintaskbar="yes"
singleinstance="yes"
sysmenu="yes"
version="1.0"
windowstate="normal"
>
<body style="text-align:center;">
<br>
<b>ComputerName:</b>  <span id="spn_ComputerID"></span>
<br>
<b>UserName</b>:  <span id="spn_UserID"></span>
<br>
<b>Manufacturer:</b>  <span id="spn_Manufacturer"></span>
<br>
<b>Model</b>:  <span id="spn_Model"></span>
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>