I`m currently working on project to make a virus shorcut recover. It using VB.net, basically I create a batch file to change file attribute from hidden to visible using /s /d -h -s -r -a. However recovery process takes longer time on a big drive. My current competitor (other software we used as our benchmark) which I doesnt really sure their programming language takes shorter time than us.
As a record, a 2GB files take 1.64 second on mine and 0.21 second on theirs. Could any of you suggest how to make cmd work faster? my current idea is to run on bulk (maybe 2 or 3 process at once)
here sneakpeek on my code.
sb.AppendLine("cmd.exe /c takeown /f " & """" & initialF & """" & " && icacls " & """" & initialF & """" & " /grant administrators:F")
sb.AppendLine("cmd.exe /c takeown /f " & """" & initialF & """" & " /r /d y && icacls " & """" & initialF & """" & " /grant administrators:F")
sb.AppendLine("attrib " & """" & initialF & """" & "\*.* /s /d -h -s -r -a")
sb.AppendLine("del HFVR.bat")
IO.File.WriteAllText("HFVR.bat", sb.ToString())