Hardawre Profile script has messy output
Posted: 13 Jan 2022 22:07
Hey, this script is intended to make a profile of a workstation. It works well but the out put is messy and very hard to read. i am wondering if anyone knows how to organize the output to a file in a cleaner manor.
any idea i have been playing with is to use the command to retrieve data based on the table header, however i do not feel that this would work universally and meet needs of potential users as it is leaving out data which may be needed.
i have deduced the disorganization in the output file to column headers and columns content being different lengths, i however have no idea how to address that issue.
another idea for addressing this problem was to use the command first in the script and subtract that data contained in the output from the string of commands with commands but it does not solve the messy output file..
is the path of the main script, %hp% is the path\filename ("hardware profile.txt"), is an error message say the rootdir does not exist and is the main menu.
Code: Select all
Set mainmenu=h
:Hardawre Profile
IF EXIST %crc% ( ECHO Running Hardware Profiling Script...
(
WMIC BASEBOARD
WMIC BIOS
WMIC CPU
WMIC MEMORYCHIP
WMIC MEMPHYSICAL
WMIC CDROM
WMIC PRINTER
WMIC OS
WMIC NIC
WMIC SOUNDDEV
) > %hp% & CALL %hp% & GOTO %h% ) ELSE ECHO %dde% & PAUSE & GOTO %h%
Code: Select all
wmic get
i have deduced the disorganization in the output file to column headers and columns content being different lengths, i however have no idea how to address that issue.
another idea for addressing this problem was to use the
Code: Select all
systeminfo
Code: Select all
systeminfo
Code: Select all
wmic
Code: Select all
wmic get
Code: Select all
%crc%
Code: Select all
%dde%
Code: Select all
%h%