Home > Software engineering >  How do I achieve prevent acad tools. Exe to write acaddoc hard disk. The LSP file
How do I achieve prevent acad tools. Exe to write acaddoc hard disk. The LSP file

Time:09-30

. Now by CAD is always generated acad. LSP, acaddoc. Tired LSP and other virus file, because the people in the company basic in this poison,
Actually used to build the original cad 3.3 can complete virus killing antivirus, a home, but others or sent email to come over, and will continue to poisoning,
Antivirus software completely invalid,

I want to write a small program, after the operation, stop the acad tools. Exe anywhere in the hard disk by generating acad. LSP and acaddoc LSP...
Using vb to call API, can achieve?
Have a great god send me a code, but didn't explain... How to realize the monitor?

Private void p_Created (object sender, FileSystemEventArgs e)
{
String name=e.N ame.
String fullPath=e.F ullPath;
Bool flag=Strings. LCase (name). The Contains (" acaddoc. LSP ");
If (flag)
{
Try
{
File. The SetAttributes (fullPath, ~ FileAttributes ReadOnly);
The FileInfo info=new the FileInfo (fullPath) {
The Attributes=~ FileAttributes. ReadOnly
};
The info. The Delete ();
Info=null;
FileStream stream=new FileStream (@ "c: \ \. TXT", FileMode, Append);
StreamWriter writer=new StreamWriter (stream);
Writer. WriteLine (fullPath + "approach: delete");
Writer. The Close ();
Stream. The Close ();
}
The catch (Exception exception1)
{
ProjectData. SetProjectError (exception1);
The Exception Exception=exception1;
FileStream stream2=new FileStream (@ "c: \ \. TXT", FileMode, Append);
StreamWriter writer2=new StreamWriter (stream2);
Writer2. WriteLine (fullPath);
Writer2. Close ();
Stream2. Close ();
ProjectData. ClearProjectError ();
}
}
}

CodePudding user response:

How can the cad of the virus, dish bird!
Cad virus is usually spread by LSP fas VLX file, the file and DWG in the same folder or package,
Before you open the DWG file, delete the file virus, will not be in!
  •  Tags:  
  • API
  • Related