Batch File Time Out
I am trying to deploy Microsoft Security Essentials and after the MSI install I run a batch file that should force MSE to update and hide. I use the following command in my batch file:
"C:\Program Files\Microsoft Security Client\msseces.exe" /update -hide
If I run this from the command line it returns instantly and starts the update but when I put this in the deploy package it just spins until it times out. I have tried a calling the command directly from the "Command to Run", I have tried creating a batch file that calls the command and returns a custom return code but each just waits until the time out period is done. Here are examples of the batch files I have tried
@echo off
"C:\Program Files\Microsoft Security Client\msseces.exe" /update -hide
exit /B 234
I have also tried putting a 6 second wait before and after the command
@echo off
PING 1.1.1.1 -n 1 -w 60000 >NUL
"C:\Program Files\Microsoft Security Client\msseces.exe" /update -hide
PING 1.1.1.1 -n 1 -w 60000 >NUL
exit /B 234
If I run this batch file from command line it runs fine and puts me back to the command prompt without any issues, and I get the error level returned. Any help would be appreciated.
Thanks
Don
Comments
The problem is that when you run the installer and batch, it is executed as non interactive service. The MSE requires a gui so thats why it works when you run it manually. There is a command line version which you can use: Microsoft Antimalware Service Command Line Utility
“C:\Program Files\Microsoft Security Essentials\MpCmdRun.exe” -SignatureUpdate
try that... BUT be aware, that the licence allows installation up to 10 computers, not nore.
http://windows.microsoft.com/en-us/windows/products/security-essentials
Ah I see about the command line version. As for licensing, yes, I am very aware and stick to the licensing. I use it only for very small clients.
Thanks, this took care of the issue!