Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
See more:
Hello
I need to check status (on/off) of system defending (antivirus,firewall,malware) using command string
can't find code to do this

What I have tried:

I tried to do this task on Visual studio 2017
Posted
Updated 24-Sep-18 22:27pm

1 solution

Visual studio 2017 is only an IDE and is not relevant for your task.
If you mean the windows defender, take a look at API / Windows Defender Functions, for example at WDStatus function:

Returns the current status of Windows Defender.

C++
HRESULT WDStatus(
  BOOL *pfEnabled
);


The status of Windows Defender as a boolean. TRUE means Windows Defender is in enabled status. FALSE means Windows Defender is in disabled status.
 
Share this answer
 
v3
Comments
Member 13996598 25-Sep-18 4:49am    
yes, VS 2017 is an IDE , but I need to create an application using it , which would be parsing command string, read commands from it then get status of defender systems and return it to cmd
Dave Kreskowiak 25-Sep-18 9:19am    
Again, Visual Studio is NOT doing this work. It's merely a tool used to create an application that will be doing this work. That application you create will be the one returning an exit code back to the process that launched it. In your case, CMD.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900