<html>
<head>
<title>CompInfo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<SCRIPT language="VBScript">
'CompInfo by Eric M. Bouse 2003
'A lot of help from Tim Hill's book "Windows 2000 Windows Script Host"
'Copy to windows folder and create a shortcut simply called "CompInfo"
'Tested on Win2k, XP
Dim oFSO, oDrives, myPath, WshShell
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oDrives = oFSO.Drives
set WshShell = CreateObject("WScript.Shell")
document.write "<u>Computer Info</u><br>"
document.write "Computer Name: " & _
WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName")
& "<br>"
document.write "Owner: " & _
WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOwner") & "<br>"
document.write "Organization: " & _
WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOrganization") & "<br>"
document.write "OS: " & _
WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName") & "<br><br>"
document.write "<u>Drive Info</u><br>"
For Each oDrive In oDrives
myPath = oDrive.Path
With oFSO.GetDrive(myPath)
'If .DriveType = 2 Or .DriveType = 3 Then
If .IsReady = True Then
document.write "Drive Letter: " & .DriveLetter & "<br>"
document.write "Drive is Ready = " & .IsReady & "<br>"
Select Case .DriveType
Case 1: myType = "Removable"
Case 2: myType = "Fixed"
Case 3: myType = "Network"
Case 4: myType = "CDROM"
Case 5: myType = "RAM Disk"
Case Else myType = "Unknown"
End Select
document.write "Drive Type: " & myType & "<br>"
document.write "Drive Label (Volume Name): " & .VolumeName & "<br>"
document.write "File System Used: " & .FileSystem & "<br>"
If .TotalSize /1024 \1000 < 2000 Then document.write "Total Size of
Drive: " & .TotalSize /1024 \1000 & "MB" & "<br>"
'Integer division
If .TotalSize /1024 \1000 > 2000 Then document.write "Total Size of
Drive: " & .TotalSize /1024 \1000000 & "GB" & "<br>"
If .FreeSpace /1024 < 2000 Then document.write "Total Free Space : " & .FreeSpace \1024 & "KB" & "<br>"
If .Freespace /1024 > 2000 Then document.write "Total Free Space : "
& .FreeSpace /1024 \1000 & "MB" & "<br>"
End If
End With
document.write("-------------------") & "<br>"
Next
'WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProductName")
'WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RegisteredOwner")
'WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RegisteredOrganization")
</script>
</body>
</html>