I have applied a method in my C # program to run a batch file, which would allow the virus to upload any file Runs the scan; OK now my batch file; Edit: I have an entirely qualified link for Avg exe and directories but have taken place here with it. Sorry for the purpose of posting stackoverflow, if it produces confusion. So my problem is the reporting side of my batch file. I can double click the batch file and scan this report. I do not make the report a problem, when I run it through my C #, I get the exit code of 2; I do not know the order, it's fine if I remove the report part of my batch file. Obviously this digit is for writing permissions, but I have checked it and the cloned user has access to the directory. Is there anything that I remember? Thanks everyone < /p> The error indicates that When you implement with the command, the .Net application running directory remains the same (if you have not changed it, it will be a folder where the .Net app is located). If your net app is not in the same folder as the bull file then you will get an error that you are actually getting. You should either specify a full path in your bat file or
@ECHO OFF c: CD ".. \ AVG \ AVG9 \" avgscana.exe / SCAN = ".. \ learninglounge.com.solar.quarantine \" /REPORT_LINK..learninglounge Edit: com.solar.antivirus \ virusReports \ report.txt "
Avgscana.exe is not located in that directory "Present" is set as when you execute the command. When you click on your bit file in the current directory of Windows Explorer, the set file is set to the directory where the bat file is located. Maybe your
avgscana.exe is located in the same folder, so it works fine.
Environment.CurrentDirectory must be set in the .Net app before launching the bat.
Comments
Post a Comment