Tuesday, 25 April 2017

SysInfo2.hta - an hta Windows script to quickly collect System Information

Some years ago I developed a .hta script in VBScript to collect system information. This was used on thousands of systems by field engineers and customers alike, so that they could quickly send a report back to the office techs for further diagnosis and investigation.

You can run SysInfo file on any Windows system that allows .hta files and VBScript to run.

If you download and unzip it, make sure Properties - UnBlock is ticked or Windows may prevent you from running it.

I have slightly revised it now for Windows 8 and 10 and also tweaked the email facility so that you can send the report, using your gmail account, to yourself or to someone else.

You can easily modify it to display your own company name in a heading, etc.



It is not perfect however (e.g. it only gives details for one CPU core and it may have problems with systems that have multiple monitors).

You can run a 'quick report' or say 'OK' to the prompt to also collect information about installed software, drivers and Event Log errors - although this can take many minutes on a 'full' system.

You can then send the report to any email recipient using your gmail account as a server.
As well as running a report on the local system, you can also get the same information from any other system in the domain and email the report.


You can also scan a network for other computer names.

Gmail account

The email routine requires the use of an existing gmail account. You must reduce the security of the gmail account by turning on the 'Allow less secure apps' control.

  1. Sign in to the Google account linked to the gmail account that you want to use. 
  2. Click on Sign in and Security
  3. Scroll down the Sign in and Security page until you see the Less Secure Apps slider control and turn it on.
  4. After 30 seconds, you should be able to send a report to any email address
You can set up a new gmail account just for this purpose if you wish.

Configuring the .hta file for email

You can pre-specify your email account details simply by editing the .hta file in Notepad

' --------- EMAIL VARIABLES - must be set for your own acccount -------------

' leave password as "" if you want to always specify the password yourself for security
esend = "" 'e.g.  "xxxxxxx@gmail.com" must be gmail account - you must set 'less secure apps' on the Google account or else get ERROR -2147220975
epwd = "" 'gmail account password - can leave blank as ""
edest = "" 'default destination email account - change or leave blank - you will always be prompted

I suggest you specify esend to save you having to type it in each time.
If you specify epwd, then you will not be prompted for a password (but anyone who has access to the .hta file will be able to see your password)
Set the edest value to your home or office email account (does not need to be gmail). You will always be prompted for a destination email address, edest is just a default initial value.

Note that a 'OK - Message sent.' message signifies the email was sent OK to the gmail server - it does not mean that it got to the final destination which could happen if the destination email address was incorrect or no longer valid!

Download

You can download SysInfo2.hta from my old Codeshop99 site here (make sure you download SysInfo2.zip).

Apart from fixing any glaring bugs, I do not intend to develop this any further, but as it is written in VBScript, you are welcome to modify it yourself!

Let me know if you find it useful by ticking one of the boxes below.

P.S. Version 1 had a nice gradient-fill background, but I cannot get it to work in later browsers AND also get the code to work at the same time!

Later versions of Easy2Boot have the SysInfo2.hta file under the \_ISO\docs folder.

Astra



For a bootable ISO which shows System Information try the Astra demo version ISO here.