wmic product and updates

HI

Is there a way to run these two wmi scripts into the same output file ??

The second script always replaces the first script

WMIC product get Description, InstallDate, Name, Vendor, Version  > c:\1.txt
WMIC qfe get description, FixComments, HotFixID, InstalledBy, InstalledOn, ServicePackInEffect   > c:\1.txt
41 01Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rob MinersCommented:
Add another > greater than redirector to your second command line.

WMIC product get Description, InstallDate, Name, Vendor, Version > c:\1.txt

WMIC qfe get description, FixComments, HotFixID, InstalledBy, InstalledOn, ServicePackInEffect >> c:\1.txt

ref# http://www.bleepingcomputer.com/tutorials/windows-command-prompt-introduction/#red
0
41 01Author Commented:
that worked great, is it possible to output both files to one html file ?
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
As far as I recall, WMIC doesn't have save as capabilities.  If you want to save as HTML, I recommend purchasing the tool System Information for Windows - I believe there's a free non-commercial version if that's your purpose or for trial - that is scriptable, a single executable, and can save to HTML, CSV, and other forms and gives a TON of information on the system.

www.gtopala.com
0
Rob MinersCommented:
Try this and see if it's to your liking,  you can use hform or htable to create htm

WMIC product get Description, InstallDate, Name, Vendor, Version /format:hform > c:\1.htm

WMIC qfe get description, FixComments, HotFixID, InstalledBy, InstalledOn, ServicePackInEffect /format:hform >> c:\1.htm

WMIC product get Description, InstallDate, Name, Vendor, Version /format:htable > c:\12.htm

WMIC qfe get description, FixComments, HotFixID, InstalledBy, InstalledOn, ServicePackInEffect /format:htable >> c:\12.htm
 
I had to follow the below procedure before I could get any output

Fix the “Invalid XSL format (or) file name” Error

http://acidx.net/wordpress/2012/09/retrieving-system-information-via-command-line-on-windows/

I'm in Australia so I had to create the below directory and add the files for the formats.

C:\Windows\System32\wbem\en-au>dir /a /b
csv.xsl
hform.xsl
htable.xsl
mof.xsl
xml.xsl

ref# http://technet.microsoft.com/en-us/library/bb742610.aspx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.