Receive Trojan FileSystemObject Warning

I wrote a little program that checks if a disk is available by the way. When I installed it on another computer, Avira Antivirus gives a Trojan warning. I have narrowed down the problematic lines of code:

20        Set fso = CreateObject("Scripting.FileSystemObject")
30        FD = fso.driveexists("F")

      

Why should I get a warning for this? I'm pretty sure I have used it in the past and have not received any warnings. However, I've only used it in a DLL in the past, and it's an EXE file. Is there any other way to check the assigned drive besides using FSO?

Thank.

+3


source to share


1 answer


The reason you get the warning is because the antivirus program thinks your script is a virus. It goes back to the time when catching a computer virus was as easy as sending VBScript into an email (called something like yourbill.pdf.vbs) and then clicking on it. This VBScript will use the FileSystemObject methods to wreak havoc and damage.

Of course ... you can still use FSO:



dim a as string
a = "ting.FileSyst"
Set fso = CreateObject("Scrip"+a+"emObject")

      

+5


source







All Articles