'Detecting anti-virus status during application installation
https://support.moonpoint.com/os/windows/commands/wmic/determine-antivirus.php
From above I got
C:\>wmic /namespace:\\root\SecurityCenter2 path AntiVirusProduct get * /value
Which seems to detect when 360 Total Security if on/off:
- When 360 is off,
productState=335872
displayName=Windows Defender
instanceGuid={D68DDC3A-831F-4fae-9E44-DA132C1ACF46}
pathToSignedProductExe=windowsdefender://
pathToSignedReportingExe=%ProgramFiles%\Windows Defender\MsMpeng.exe
productState=393472
timestamp=Mon, 09 May 2022 04:41:04 GMT
displayName=360 Total Security
instanceGuid={FFDC234A-CE9B-08F9-406B-F876951CE066}
pathToSignedProductExe=C:\Program Files (x86)\360\Total Security\safemon\QHSafeTray.exe
pathToSignedReportingExe=C:\Program Files (x86)\360\Total Security\safemon\WscReg.exe
productState=335872
timestamp=Thu, 19 May 2022 15:00:35 GMT
- When 360 is on,
productState=331776
displayName=Windows Defender
instanceGuid={D68DDC3A-831F-4fae-9E44-DA132C1ACF46}
pathToSignedProductExe=windowsdefender://
pathToSignedReportingExe=%ProgramFiles%\Windows Defender\MsMpeng.exe
productState=393472
timestamp=Mon, 09 May 2022 04:41:04 GMT
displayName=360 Total Security
instanceGuid={FFDC234A-CE9B-08F9-406B-F876951CE066}
pathToSignedProductExe=C:\Program Files (x86)\360\Total Security\safemon\QHSafeTray.exe
pathToSignedReportingExe=C:\Program Files (x86)\360\Total Security\safemon\WscReg.exe
productState=331776
timestamp=Thu, 19 May 2022 15:10:30 GMT
Is this a good approach to check status of 360, and other anti-virus?
Perhaps I should also ask, where can I read more about meaning of productState?
I am planning to use something like this on a QTIFW installer for a Qt5 project on Windows to inform the user anti-virus should be disabled during installation.
The d3dcompiler_47.dll is the file 360 flags.
Another approach might be cited here, which involves playing with
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
Solution 1:[1]
See Finding Credentials Automatically. Using these "Application Default Credentials" is a good practice. All you need do is have a Service Account with suitable role|permissions and, if you're running off-GCP (i.e. not on Compute Engine etc.), then you'll need to create a Service Account key and reference it GOOGLE_APPLICATION_CREDENTIALS before you run your code.
Google Cloud Storage (GCS) does not really have a concept of folders nor "sub-buckets". In fact, everything in a GCS bucket is called an Object but Object names may include / (this is the *nix equivalent of Windows' /) and commonly (!) used to denote folder paths.
So, you only really have to worry about recursively iterating over your Windows folders (I'll leave that to you) and then for every file that your code finds, it will need to create an Object in your GCS bucket that comprises:
- The bucket
- The folder structures with
/instead of\ - The filename
i.e.
\F1|Data\Export\PlayOnUsers\2021\12\xbecomesgs://your-bucket/F1/Data/Exporter/PlayOnUsers/2021/12/x\F1|Data\Export\PlayOnUsers\2022\01\xbecomesgs://your-bucket/F1/Data/Exporter/PlayOnUsers/2022/01/x
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | DazWilkin |
