ANTONIO G
asked on
How create a batch file using WMIC
Hi,
I'd like to make a bach file (.bat) using these wmic commands :
wmic /output:c:\COMPUTERNAME_os .list os get /format:list
wmic /output:c:\COMPUTERNAME_sw _installat i.list product get /format:list
wmic /output:c:\COMPUTERNAME_av .list /NAMESPACE:\\root\Security Center2 PATH AntiVirusProduct GET /value /format:list
wmic process list full > c:\COMPUTERNAME_process.li st
tasklist /svc > c:\COMPUTERNAME_servizio.l ist
systeminfo > c:\COMPUTER_sysinfo.list
At the end of the day I should have 6 files (.list)
I would be more than grateful if somebody can help me.
Thank you
Antonio
Italy.
I'd like to make a bach file (.bat) using these wmic commands :
wmic /output:c:\COMPUTERNAME_os
wmic /output:c:\COMPUTERNAME_sw
wmic /output:c:\COMPUTERNAME_av
wmic process list full > c:\COMPUTERNAME_process.li
tasklist /svc > c:\COMPUTERNAME_servizio.l
systeminfo > c:\COMPUTER_sysinfo.list
At the end of the day I should have 6 files (.list)
I would be more than grateful if somebody can help me.
Thank you
Antonio
Italy.
ASKER
Hi Shaun,
thanks a bunch for your answer.
I'm really sorry but it seems that does not work.
Launching the .bat file, it starts looping forever....
thanks a bunch for your answer.
I'm really sorry but it seems that does not work.
Launching the .bat file, it starts looping forever....
Weird, there is no loop involved
ASKER
Well,
as soon as I launch the .bat file, it runs launching commands forever like a loop...
I've attached a file video.
as soon as I launch the .bat file, it runs launching commands forever like a loop...
I've attached a file video.
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here is video of batch
http://somup.com/cbeo2fRTJ
http://somup.com/cbeo2fRTJ
ASKER
Thank you very much for your answer.
Well, now it stucks on the first command line : wmic os get /format:list > %COMPUTERNAME%_os.list
with no output at all.
It stucks for more than 30 seconds....
Here is another video of batch
C--Users-a_guarnieri1-Documents-Camt.mp4
Well, now it stucks on the first command line : wmic os get /format:list > %COMPUTERNAME%_os.list
with no output at all.
It stucks for more than 30 seconds....
Here is another video of batch
C--Users-a_guarnieri1-Documents-Camt.mp4
Tested and working
Open in new window