Registriert seit: 18. Aug 2004
Ort: Edewecht
712 Beiträge
Delphi 5 Professional
|
Re: Testen ob die Firewall aktiv, ein Vierenscanner installi
29. Okt 2004, 15:08
Zitat von mateng:
wie Prüfe ich ob ein Virenscanner installiert bzw aktiv ist?
Delphi-Quellcode:
procedure TesteMeineAntiVirenSoftware;
const
AV_TEST_STR = 'X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*';
AV_TEST_FILENAME = 'ANTIVIRUS-TEST-FILE';
var
TempPath: String;
FileStream: TFileStream;
FileNameTxt: String;
FileNameExe: String;
begin
SetLength(TempPath, MAX_PATH);
SetLength(TempPath, GetTempPath(Length(TempPath), PChar(TempPath)));
TempPath := IncludeTrailingPathDelimiter(TempPath);
FileNameTxt := TempPath + AV_TEST_FILENAME + '.TXT';
FileNameExe := TempPath + AV_TEST_FILENAME + '.EXE';
FileStream := TFileStream.Create(FileNameTxt, fmCreate);
try
FileStream.WriteBuffer(AV_TEST_STR, Length(AV_TEST_STR));
finally
FileStream.Free;
end;
if RenameFile(FileNameTxt, FileNameExe) then
ShellExecute(0, 'open', PChar(FileNameExe), nil, nil, SW_SHOWNORMAL);
end;
Weiter Informationen findest du unter http://www.eicar.org/anti_virus_test_file.htm
Ciao, Sprint.
"I don't know what I am doing, but I am sure I am having fun!"
|
|
Zitat
|