Rob van der Woude's Scripting Pages

Basic Hardware Inventory

Version 9.03

 

 

Use this HTA to get a basic hardware inventory of any WMI enabled computer on the network.
 
Screenshot of Hardware.hta - Basic Hardware Inventory
 
This HTA does not demand elevated privileges, though they are still recommended.
 
Elevated privileges recommended
 
Unless you started the HTA with the optional /NOADMIN command line switch, the HTA will prompt you when running without elevated privileges.
Clicking ""Yes"" will restart the HTA with elevated privileges.
 
Interactive use:
 
Open the Basic Hardware Inventory tool by double clicking the file hardware.hta.
 
Fill in the name or IP address of a remote computer in the "Computer" field at the top of the screen. Or you can use the "Paste" button at the left of this field to paste the computer name from the clipboard. Or just leave the "Computer" field empty to use the default: the local computer.
 
If you only want a limited inventory, deselect the components you want to skip by deselecting the appropriate checkboxes at the left.
Or use the "Basic" button at the top (or its Alt+B/Alt+F keyboard shortcuts), to toggle between a basic (CPUs, memory and harddisks) and full inventory.
 
Click the "Go" button next to the "Computer" field (or use its Alt+G keyboard shortcut) to start the inventory. This may take a couple of seconds or sometimes even minutes.
 
When the results are displayed, you can use the "Copy" button at the bottom to copy them to the clipboard, or the "Save" button to save them to a (tab delimited) text file, or the "Print" button (or using its Alt+P keyboard shortcut) to open a print preview of the results.
As of version 6.00, "fast printing" is available: just press Ctrl+P on the keyboard and select a printer.
"Save" by default writes the results to a file named "Hardware.computername.20241121153225.txt" in the HTA's parent folder.
To use a different path, use command line switch /SAVE (view the Help screen for details).
Exported results are in tab delimited format.
 
By clicking the "Settings" button (or using its Alt+S keyboard shortcut), the HTA's Settings screen will be opened.
Here you can set your preferred window size, whether you want to use DxDiag and/or DMIDecode, if available, to get more details, and you can play with the HTA's themes and custom color settings.
When saved, the settings are stored in a plain ASCII text file named "Hardware.cfg", located in the HTA's parent folder.
This configuration file may be edited with a text editor (e.g. Notepad), and should contain a single line with command line switches.
View the Help screen to list all available options.
 
Screenshot of Hardware.hta settings
 
Return to the main screen by clicking the "Cancel" button or pressing the "Esc" key.
 
Back in the main screen, use any of the "Details" buttons to display more details for the selected hardware category. If the /DXDIAG command line switch was used (for the local computer only), besides WMI data, DxDiag data will be displayed too for CPU, memory, harddisks, CDROMs, video, sound, ports and BIOS.
 
Hover your mouse pointer over any field or button to display a short help text in a tooltip; after the inventory, the tooltip will show the new value of the field.
 
Click the "Reset" button at the top (or use its Alt+R keyboard shortcut) to clear the results before starting a new inventory.
 
For help on command line options, press F1 or click the "Help" button at the bottom.
 
Screenshot of Basic Hardware Inventory help screen
 
To view the credits, click the "Credits" button at the bottom (or use its Alt+C keyboard shortcut) of the Main screen.
 
Screenshot of Basic Hardware Inventory Credits screen
Command line:
 
Open the HTA's Help screen for details on the HTA's command line options and keyboard shortcuts.

 

Known Issues

 

Change History

Version Release Date
(yyyy-mm-dd)
Changes
9.03 2024-09-26
  • Ports inventory now includes IEEE 1394 Firewire ports
  • Parallel and serial ports are now grouped as "Legacy ports"
9.02 2023-04-09
  • The Settings and Help screens now show the correct default theme (Black-and-White)
9.01 2023-03-30
  • Default theme now really changed to Black-and-White
  • Fixed some "non-fatal" coding inconsistencies (replaced objDictionary( "key" ) by objDictionary.Item( "key" ) for consistency's sake)
9.00 2023-03-28
  • Keyboard and mouse now each have their own row in the main screen
  • Keyboard and mouse info that cannot be read reliably without elevated privileges will be hidden from view when running without elevation
  • Routines to retrieve network adapter, harddisk and sound device information were rewritten
  • Default theme changed to Black-and-White
  • Improved error handling for remote access problems
  • Removed custom window size function (/SIZE switch)
  • The HTA now starts maximized
  • Removed Maximize and Minimize keyboard shortcuts
  • Fixed an issue with zoom factor other than 100% and overlapping memory output fields
  • As a workaround for the Google Chrome issue (see known issues) an unelevated minimized Chrome session is started just before the HTA restarts itself with elevated privileges if Chrome is the default browser and if Chrome is not running yet
  • An informational message will popup if action is required to enable WinSAT scores (see known issues)
  • WMI-related code optimized for better performance
  • As of this version Windows 7 and earlier versions are no longer supported; use version 8.04 (included in download) on these older systems
8.04 2023-02-06
  • Fixed: routine for 4GB or more video memory would not work if multiple video controllers were installed
  • Fixed: as WMI does not return the correct amount of video RAM for internal video controllers, the HTA will now always try and read the correct amount from the registry for every video controller installed
8.03 2023-01-27
  • Fixed: virtual video device (e.g. Citrix) would result in empty field above first video device
  • Fixed: routine for 4GB or more video memory would not work on remote computers
  • Fixed: "Details" button for CD-ROM devices would only be enabled if at least 2 CD-ROM drives were available
8.02 2023-01-03
  • Fixed: very long property names would be truncated in details windows
8.01 2023-01-03
  • Fixed: several error messages caused by disabled "On Error Resume Next" lines that should have remained enabled
8.00 2022-06-25
  • The HTA no longer uses Internet Explorer
  • More debugging messages when /DEBUG switch is used
  • Timestamp format changed in debug output (now contains delimiters)
  • Fixed: sound button remained disabled when running in WinPE mode
7.11.1 2022-02-04
  • Fixed: an error would occur when no floppy drive was connected.
7.11 2022-02-04
  • Floppy drives have been added as a category in the main window.
7.10 2021-11-15
  • Use of Internet Explorer is forced regardless of /NOIE setting when running without elevated privileges.
7.09 2021-11-14
  • Minor change: when you right-click a field, its content is selected.
    This makes copying individual fields' content easier.
    The code to accomplish this is an oncontextmenu="this.select()" event handler for each HTML text input.
7.08 2021-05-10
  • Bugfix: the HTA minimizes at startup, and restores the window when the interface is completely loaded, or you would be staring at a blank window for several seconds.
    However, restoring the windows would fail if the window lost focus.
    The bugfix in version 7.06 did not always solve this issue.
    It has now been fixed by adding a line window.focus just before the code to restore the window.
7.07 2021-03-10
  • Fixed the garbled © character in the title bar
  • Added a warning note in the help screen on using /NOIE switch by non-admin users
  • Added some code to ease the process of creating screenshots for this web page
7.06 2021-02-23
  • Added some JavaScript code to fix a bug where the window would remain invisible on some systems at startup
7.05 2021-02-18
  • DWORD and QWORD values from the registry are now shown both in hexadecimal and decimal in details windows
7.04 2021-02-17
  • Added a work-around for video RAM exceeding 4 GB (WMI uses UInt32 for Win32_VideoController's AdapterRAM property, which is limited to 0xFFFFFFFF, i.e. 4 GB)
  • Fixed a bug in displaying registry data in details windows
7.03 2020-07-19
  • New memory speed field in GUI
  • New memory speed column in exported results
  • Fixed a bug where WinSat score fields in exported results remained empty
7.02 2020-07-15
  • New memory form factor field in GUI
  • New memory form factor column in exported results
7.01 2020-04-10
  • Performance improvement by replacing the external PowerShell script by "native" VBScript code.
  • New setting (command line switch /VIRTUAL) to include virtual disk drives in the inventory.
  • Added an extra test if the HTA is prepared for icon embedding to the batch file.
7.00 2020-04-07
  • New zoom option (command line switch /ZOOM:percentage) to scale the HTA's content.
  • Harddisk interfaces are now queried by on-the-fly PowerShell code, making the results more reliable, though still not 100% error-free.
  • The number of harddisks, CDROM drive, network and video cards and monitors displayed are no longer limited by a fixed number table rows, instead table rows will be added on-the-fly when needed.
  • Because there is no limit for these devices, the saved tab-delimited export files no longer have a fixed number of columns for each device type, i.e. the number of columns will depend on the specific hardware.
  • New dark theme (black background), but no more background gradients
  • The download ZIP file also contains an icon and a batch file to embed the icon in the HTA (can only be used once, and HTA can no longer be edited).
6.16 2017-10-11
  • A lot of new code has been added to allow running this HTA in WinPE (10) and safe mode.
    Note that not "all" information will be available in these "limited" environments, e.g. monitors and video memory may be missing, in case of multiple video cards only one may be listed, the same for audio.
    Besides, in WinPE no Internet Explorer is available, nor DxDiag or DMIDecode, so you cannot investigate hardware details beyond the main window.
  • The HTA's ID has been changed from "HardwInv" to "Hardware"; a minor detail indeed, but it allows you to run this new version beside an old version of the HTA.
6.15 2017-04-14
  • Bugfix: fixed "variable is undefined" errors.
6.14 2017-04-13
  • Implemented a solution contributed by Russell J. Wiley to always open Internet Explorere windows (debug and print dialogs and detailed WMI query results) in the foreground.
  • Modified the Win32_CDROM WMI query to exclude CDROM drives with the word "virtual" in their names, to prevent virtual CDROM drives from being listed.
6.13 2016-08-17
  • Corrected a broken link in the Help text
6.12 N/A Oops, skipped
6.11 2016-02-13
  • Another bug in the window sizing (the program would sometimes ignore screen size settings in the configuration file), also reported by Steve Robertson, has been fixed.
  • And yet another bug in the window sizing (the window size would go haywire when dragging or resizing the window), again reported by Steve Robertson, has been fixed.
  • Elevated privileges are no longer mandatory, though still recommended to get "all" details; if you start the HTA without elevated privileges, it will prompt you to restart with elevated privileges.
  • Because elevated privileges are no longer mandatory, an optional command line switch /NOADMIN was added to allow skipping the test for elevated privileges.
  • Keyboard and mouse detection routines were improved to get at least some results without elevated privileges.
  • More keyboard shortcuts have been implemented; see the HTA's Help screen for details.
  • The new "Edit" button in the Settings screen opens the configuration file in Notepad; when closing it, any changes are immediately applied.
  • Debug mode was implemented: some intermediate setting can be displayed in a separate Internet Explorer window.
  • Optionally, the Debug window's content can be saved to a log file when the HTA is closed.
6.10 2016-02-06
  • A bug in the window sizing (the program would look for a setting "maximize" but ignore a "numerical" setting equal to the screen size), reported by Steve Robertson, has been fixed.
  • A bug in the monitors detection (no monitors found in Windows 8.* and 10), also reported by Steve Robertson, has been fixed.
  • The monitors detection has been completely rewritten to fix this bug.
    Previous versions of this HTA used the raw EDID data (large array of byte numbers), retrieved from the registry, to find the model, serial number and manufacturer; the new version uses WMI instead, and reads the model and manufacturer as plain string values from the registry.
  • Due to the "almost-entirely-WMI" monitor detection, detection will most likely fail in Windows XP or older; if you still use Windows XP, consider not updating this HTA.
  • The details window for monitors has a new added paragraph with relevant registry values.
  • A new optional setting and its command line swich /CHAIN allow character arrays in details windows to be displayed as interpreted text too, e.g.
    PropertyValue (array) : 83,121,110,99,77,97,115,116,101,114,0,0,0
    PropertyValue (string): SyncMaster
  • Some BIOS property values have been replaced by SMBIOS BIOS properties in the main window, as these SMBIOS values seem more accurate.
  • When you hover the mouse pointer over a field, the value is shown in a tooltip, so you no longer need to click a field and scroll to the right to read the entire value.
  • Keyboard shortcuts have been implemented for several buttons; see the HTA's Help screen for details.
6.09 2016-01-19
  • In the Settings screen, a new "Delete XML" button allows you to quickly delete DxDiag's existing XML file just once, even when the HTA is set to keep the existing XML file.
  • Theme settings were added: you can now completely customize the HTA's colors.
  • New optional command line switches were added to allow setting the theme on the command line too.
6.08 2015-10-29
  • A specific error message is displayed if the HTA runs with 32-bit MSHTA.EXE on 64-bit Windows.
  • WinSAT Scores fields are no longer displayed in Windows XP or older.
  • Credits for DMIDecode for Windows were added.
6.07 2015-10-22
  • A bug in the NIC Speed detection has been fixed.
  • The WMI query for physical network adapters has been simplified.
6.06 2015-10-19 A bug which made the HTA trip on empty PATH entries has been fixed.
6.05 2015-05-06 A bug which prevented remote inventories has been fixed.
6.04 2015-04-26 Two annoying inconsistencies, both reported by Steve Robertson, were fixed:
 
  • If no network connection is available, the HTA will no longer suggest to manually check for updates.
  • I changed the default file extension for tab delimited output from ".csv" to ".txt".
6.03 2015-04-20
  • A bug reported by Steve Robertson was fixed (error in the default path for the configuration file).
  • An issue is fixed to allow stand-alone use (if no network connection was available, the check for updates would crash).
6.02 2015-03-26
  • A new optional switch /DMIDECODE uses DMIDecode to add DMI/SMBIOS data to several Details pages.
  • The /SAVE switch no longer asks for a file name if no file name was specified, but uses Hardware.computername.20241121153225.csv in the HTA's parent folder.
  • The /SAVE switch now also accepts file names as parentfolderpath\*, in which case Hardware.computername.20241121153225.csv will be used in the specified folder parentfolderpath.
  • Several quirks and bugs reported by Steve Robertson were fixed.
6.01 2014-01-16
  • Added the BIOS serial number to the printout and export to CSV.
6.00 2014-01-15 A reshuffle of the user interface, plus some code optimization:
 
  • All permanent settings are displayed in their own window when the "Settings" button is clicked.
    All permanent settings can be changed interactively.
    The configuration file can also be edited "manually" in Notepad.
    The settings can be restored to "factory defaults" by clicking the "Reset" button.
  • The Settings, Help and Credits screens are all opened in the main program window, thus minimizing the chance of stray Internet Explorer leftover sessions after closing the HTA.
    Pressing the Escape key returns you to the main program window.
    In the Help and Credits screens, pressing the Backspace key will do the same.
  • CSS code has been added to allow fast printing without the use of an Internet Explorer object (press Ctrl+P to print).
  • Some switches can no longer be used in the configuration file, but are now commandline-only; see the program's Help screen for details.
  • Fixed print preview issue.
  • The HTA checks if it is running with elevated privileges, and displays an error message if not.
5.51 2013-11-19
  • Added Windows System Assessment Tool's (WinSAT) scores.
  • Improved update check, it now starts in a separate thread to speed up initial window loading.
  • Less dependency on separate Internet Explorer objects.
  • Fixed more incorrect HTML and CSS to anticipate future Internet Explorer versions.
5.50 2012-12-20
  • Added an HTML document type and fixed some incorrect CSS to make the HTA display correctly in Windows 8.
5.49 2012-01-13
  • Fixed another bug with the Hardware.cfg configuration file: a 0 byte file (or no read access to the file) would still sometimes generate an error message (bug reported by Steve Robertson). As of now, if a 0 byte configuration file is saved, it will be deleted immediately.
5.48 2012-01-09
  • Fixed another bug with /Print and IE9: the print window must be visible for a couple of seconds to allow IE to send the data to the printer.
5.47 2012-01-09
  • Fixed a bug with the Hardware.cfg configuration file: a 0 byte file would crash the HTA (bug reported by Steve Robertson).
  • Fixed a bug with Print and IE9: IE9 suddenly refused to show a print preview if the IE object was invisible.
5.46 2012-01-05
  • Added a "Print" button and /PRINT command line switch.
  • When the "Inventory" button is clicked, all deselected components (rows) will be hidden from view.
5.45 2011-10-13
  • Added physical monitor dimensions (requires Windows Vista or later).
  • Added the /CM command line switch to display physical monitor dimensions as width x height cm instead of diagonal in inches.
5.44 2011-09-25
  • If the /DXDIAG command line switch is used on the local computer, DxDiag data will now be displayed, besides WMI data, in most Details windows.
5.43 2011-09-18
  • Fixed errors occurring when switching between Help and Credits.
  • Fixed missing and incorrect Help and Credits window titles.
  • Fixed Help and Credits windows' focus.
  • Prevented multiple instances of the Help and Credits windows to be opened.
5.42 2011-09-17
  • Added support for USB harddisks (command line switch /USBSTOR).
  • Added command line switches /DXDIAG, /KeepXML and /XML. These switches allow you to use DxDiag.exe to query DirectX data instead of WMI for video memory and screen resolution. The details window for the video controllers will contain DirectX as well as WMI data if /DXDIAG is used.
    The DirectX query may take a minute or more, unless the /KeepXML switch is used (then it takes that long only the first time the HTA is run).
  • Added a "Save" button and /SAVE command line switch to save the results in tab delimited format to a file.
  • Moved the help text to an Internet Explorer window, as the amount of text now exceeds the limit for MsgBox dialogs.
  • Added some extra error handling and error messages, to allow debugging.
  • Rearranged some of the buttons.
5.41 2011-07-29
  • USB field now distinguishes between USB 2.0 (or older) and 3.0.
  • System Slots field now distinguishes between PCI and PCI Express.
  • Improved SATA detection (though still far from perfect).
  • Added Details button for monitors (won't show any useful information in Windows 2000).
  • Inventory now uses a PING before trying to connect to the specified computer, thus significantly decreasing the delay in case the computer is not online or does not exist.
  • Details windows now show namespaces as well as class names.
  • Details windows now show number of instances found for each class.
  • Details windows now correctly display properties of type Array.
  • Fixed some bugs in the interface (focus).
5.40 2011-07-10
  • The HTA is much faster.
  • With the new "Basic" button you can easily toggle between a basic (CPUs, memory and harddisks) and full inventory.
  • Clicking the new "Help" button opens the Command Line Help window, just like pressing F1 does.
  • The credits were moved to a separate screen. Clicking the new "Credits" button opens the Credits window.
  • The delay times between inventories of components have been removed again. The optimized code doesn't leave the HTA unresponsive for a long time, so the delays became obsolete.
    The /NODELAYS command line switch has been removed too.
    Only one single delay remains, between pressing the "Go" button and actually starting the inventory; the delay allows the HTA to immediately disable its checkboxes and buttons.
5.30 2011-07-05
  • A check for the Internet Explorer has been added, so the HTA now correctly displays multiple harddisks, CDROMs, network or video adapters in IE7 too.
  • The delay times between inventories of components have been corrected (these delays allow the HTA to update its GUI with intermediate results).
  • The new command line switch /NODELAYS will skip those delays (at the risk that impatient users may invalidate the results by clicking because the HTA does not seem to respond).
  • The two rightmost columns became wider, so the minimum required screen width is now 1024 pixels.
5.21 2011-06-25
  • Two minor bugs in the interface were fixed.
5.20 2011-06-19
  • Added command line switches /BASIC (select CPU, memory and HDD only), /COMPUTER:name (specify computer to be queried, starts inventory immediately), and /COPY (copy the results to the clipboard and terminate the program).
  • The command HARDWARE.HTA /COMPUTER:MYPC /COPY /NOUPDCHK will copy the inventory results of computer MYPC to the clipboard.
  • The command HARDWARE.HTA /COMPUTER: /BASIC /COPY /NOUPDCHK will copy the very basic inventory results of the local computer to the clipboard.
5.10 2011-06-16
  • Now differentiates between IDE and SATA interfaces for harddisks and CDROM drives.
5.00 2011-06-15
  • Rewrote the code for multiple instances of components (HDD, CDROM, and video and network adapters).
  • Added on screen help (press F1).
  • Added several command line switches (pressing F1 will list them all).
  • Now displays intermediate results while the inventory is running.
  • Can now handle up to 8 harddisks, and up to 4 CDROMs, video cards and/or network adapters.
4.21 2011-01-12
  • Fixed a problem with Win32_NetworkAdapter's "PhysicalAdapter" property (which isn't supported in Windows XP).
4.20 2010-09-26
  • Improved filtering in case of multiple monitors.
  • Improved filtering of network adapters (now displays active physical ethernet adapters only).
4.10 2007-02-15
  • Added monitors to the inventory.
4.00 2006-11-11
  • Added sound cards to the inventory, plus support for multiple video and network adapters.
  • Removed commas from CSV file to enable more reliable import in spreadsheets.
3.02 2006-01-15 No change log was kept before this version.

 

Download Basic Hardware Inventory 9.03:

 

Checksums:
File name:
MD5:
SHA1:
 
hardwinv.zip
b2426da48d198509031f99d61b28d6a6
b2f16a22c115dee1f8001a97117ce258cfa11c4b

 

 

100% CLEAN award granted by Softpedia

 


page last modified: 2024-09-26; loaded in 0.0038 seconds