Most of the time we need our client’s hardware information. CPU-Z is a freeware that gathers information on some of the main devices of your system.

CPU-Z is capable of generating html report. Client can send the report as an attachment to us. To make this task simpler, we are using script to automate the same. Script will generate cpu-z report in html format at it will ask user for their email server credential to send the report via email.

Download CPU-Z
CPU-Z

Download sendEmail for windows
sendEmail

Running the program
Create an “inv” folder in c:
Extract CPU-Z and sendEmail & copy cpuz.exe, cpuz.ini, sendEmail.exe to c:\inv
Your folder structure should be

c:\inv--|
        --------|cpuz.exe
        --------|cpuz.ini
        --------|SendEmail.exe
        --------|report.bat

We need to modify cpuz.ini as per our need,

[CPU-Z]
[CPU-Z]
TextFontName=Verdana
TextFontSize=13
TextFontColor=000060
LabelFontName=Verdana
LabelFontSize=13
PCI=0
MaxPCIBus=256
DMI=1
Sensor=0
SMBus=0
Display=1
ShowDutyCycles=0

Now we have to create bat file for sending CPU-Z’s report
report.bat

@echo off
cd c:\inv\
del report.htm
echo "Genrating cpuz info"
cpuz.exe --html=report
cd \
cd c:\inv
SET /P from=[Enter your email id]
SET /P to=[Enter the person email id to whom you want to send email]
SET /P sub=[Enter subject]
SET /P smtp=[Enter your smtp server ip]
SET /P port=[Enter your smtp server port]
SET /P username=[Enter username for smtp server]
SET /P password=[Enter smtp server password]
sendemail.exe -f %from% -t %to% -u %sub% -s %smtp%:%port% -m "inv report" -a report.htm -xu %username% -xp %password% -l smtp.log -o message-content-type=auto

Bat file will generate a report of CPU-Z & send the same on user mention email id. It will ask user for his email id, sender, subject, smtp server address, credentials for smtp server. It will also generate a log file as c:\inv\smtp.log
You can hard code your email id, smtp server credentials.

Generating report via CPUZ and sending it to your email id

One thought on “Generating report via CPUZ and sending it to your email id

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recommend on Google