This HTA script will allow you to enter a machine name and will then return the following Page file information for the machine to the active window: Page file name, initial size and maximum size.
HTA Script:
<html>
<head>
<title>HTA Script</Title>
<style>
Body {Background-Color: CornSilk}
</style>
<HTA:Application
Caption = Yes
Border = Thick
ShowInTaskBar = No
MaximizeButton = Yes
MinimizeButton = Yes>
<script Language = VBScript>
Sub WindowsLoad
strComputer = MachineName.Value
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_PageFile")
For Each objItem in colItems
Window.Document.Title = "Page File Information For : " & UCase(strComputer)
strHtml = strHtml & "<td><Font color = Blue>" & "Page File Name: " & "</Font></td>"
strHtml = strHtml & "<td><Font color = Red>" & UCase(objitem.Name) & "</Font></Td></Br>"
strHtml = strHtml & "<td><Font color = Blue>" & "Initial Size: " & "</Font></td>"
strHtml = strHtml & "<td><Font color = Red>" & objitem.InitialSize & " MB" & "</Font></Td></Br>"
strHtml = strHtml & "<td><Font color = Blue>" & "Maximum Size: " & "</Font></td>"
strHtml = strHtml & "<td><Font color = Red>" & objitem.MaximumSize & " MB" & "</Font></Td></Br>"
Next
DataArea.InnerHtml = strHtml
End Sub
</script><Body>
Enter Machine Name: <Input Type = "Text" Name = "MachineName">
<input Type = "Button" Value = "Run Script" Name = "Run_Button" onClick = "WindowsLoad"><P>
<span Id = "DataArea"></Span></Body><Div Align = "Center">
<p><A Href="http://myitforum.com/cs2/blogs/dhite">Created For myITforum By Don Hite</A>
No Comments