等到Symantec End Point DoScan.exe完成扫描文件
我正在开发一个使用文件上传的应用程序。我的客户端在Windows Server上使用Symantec End Point Protection。
所以,我使用示例代码来检查文件是否正在服务器上传。
我使用命令行调用SEP。
示例代码:
String[] commands = new String[6];
commands[0] = "cmd";
commands[1] = "/c";
commands[2] = "C:\Program Files\Symantec\Symantec Endpoint Protection\DoScan.exe";
commands[3] = "/cmdlinescan";
commands[4] = "/ScanFile";
commands[5] = fileName;
Process process = Runtime.getRuntime().exec(commands);
int exitVal = process.waitFor();
我也遇到过这种情况,SEP为每个扫描文件生成每日日志。
scanResult = "C:\Documents and Settings\All Users\Application Data\"Symantec\Symantec Endpoint Protection\Logs\";
所以,我想在这里扫描文件。
我已经检查开始在位置读取文件。一旦它从流程返回0
但是在SEP将日志写入文件之前会返回"int exitVal = process.waitFor();"
。
那么,SEP"DoScan.exe"
是否正在调用线程来开始扫描文件。
如果是,请建议我另类。
任何帮助,将不胜感激
没有找到相关结果
已邀请:
1 个回复
琶竞捆栓
的结果是.log文件。 所以,我写了一个循环,继续根据日志文件的最后修改日期进行检查。 一旦,日志文件被修改,我读取结果。