I have a code in AutoIt that runs procmon.exe programmatically. Now I want to translate the code into C# so that I can run it via Microsoft Visual Studios thus can anyone guide me to completing it ?
Code in AutoIt
{
Global $scriptDir = FileGetShortName(@ScriptDir)
Global $logDir = "C:\\log\\registry\\"
Global $date = @YEAR & @MON & @MDAY
Global $time = @HOUR & @MIN & @SEC
$ReadUsername = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\COM\Upload", "I")
Run("procmon.exe /LoadConfig " & $scriptDir
& "\\registrymonitoring.pmc /Quiet /AcceptEula /BackingFile "
& $logDir & $ReadUsername & "-" & $date & "-" & $time, "", @SW_HIDE)
}
Any advice is translating it to C# ?
This should be it:
I don’t have that registry key or procmon to hand so I’m relying on the
Console.WriteLineto see it it’s right. The only thing I couldn’t figure out how to do was getting the short name, so I just imported the winapi function and used that (taken from here).