Hack Forums
[Help] Having issues with a batch script (Variables) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5)
+---- Thread: [Help] Having issues with a batch script (Variables) (/showthread.php?tid=6231472)



Having issues with a batch script (Variables) - SIM-587985 - Jan 23, 2023

Trying to save the output of this batch script as a variable as well as go to a text file.
I have gotten it to save to a text file, but I am just having no luck saving as a variable.

This is the code I am using:

Code
wmic /node:localhost /namespace:\\root\SecurityCenter2 path AntiVirusProduct Get DisplayName |findstr /V /B /C:displayName> Antivirus.txt || echo None > Antivirus.txt

It's been a while since I have really messed around with batch, any recommendations would be appreciated.


RE: Having issues with a batch script (Variables) - HFDone - Jan 24, 2023

(wmic /node:localhost /namespace:\\root\SecurityCenter2 path AntiVirusProduct Get DisplayName | findstr /V /B /C:displayName || echo None) > Antivirus.txt