Hi, I'm Victor and I have to run "Microsoft Windows Malicious Software Removal Tool v4.10" to ALL the clients and server of our customer (about 60 machine).
I want to read the log file of the scan result (mrt.log on %WINDIR%\debug path) in the Agent Logs >Agent Procedure Log section of Kaseya.
So I create a procedure but when I take a look to the Procedure Log instead of the content of mrt.log I get strage caracters, like this: ÿþ
I get this even the log file is very short....what I'm doing wrong?? Can you help me please?
This is the procedure:
The problem here is that the MRT.LOG is formatted in Unicode and not ANSI.
Add the following step as an 'Execute Shell Command' and then update your script to collect the info from the new logfile
type %windir%\debug\mrt.log >> %temp%\mrt.log
This will rewrite the log into a format that the Kaseya Agent can interrogate.
Thanks for your reply.
So I tried to create new "execute shell command - get results to variables " step and in the field "enter shell command to execute" I wrote your command: type %windir%\debug\mrt.log >> %temp%\mrt.log but doesn't work...
what i'm doing wrong?? shell command is correct?
In the agent log I get these:
ERROR: getVariableValue() failed to get dynamic script variable value, type 1 - %temp%\mrt.log.
ERROR: doGetVariableValue() failed to open C:\Users\VITTOR~1.OCH\AppData\Local\Temp\mrt.log. Code: 2
Thanks in advance
I suggest that you separate the process so that the shell command and the get variable are 2 individual script steps
1. Execute Shell command (type %windir%\debug\mrt.log >> %temp%\mrt.log)
2. Get Variable -- File Content (%temp%\mrt.log)
This works for me.
With your suggestions my script now is like that:
OS 32 or 64 Bit Check, If return value 64-Bit WindowsTHEN
Write file VSASharedFiles\Conficker\Windows-KB890830-x64-V4.10.exe to #AgentTempDir#\Windows-KB890830-x64-V4.10.exe
Execute #AgentTempDir#\Windows-KB890830-x64-V4.10.exe /Q as Execute as the system accountand wait for completion
Execute Shell Command - Get Results to Variable with params type %windir%\debug\mrt.log >> %temp%\mrt.log.
Create variable scansione and store File Content %temp%\mrt.log
Write '#scansione#' into the procedure log
This might be correct...isn't it?
Sorry I was wrong.....I used the step "Execute Shell Command - Get Results to Variable" and not "execute shell command"....now it works and I can read the mrt.log in the Agent Procedure Log finally!!! :D
Thank you very much...!!!
Have a nice day! :-)