Scheduled Blat (mail) task does not run Windows2012
Posted on 2014-03-12
I have a problem getting a scheduled task running Blat on a Windows Server 2012.
The task consists just one simple bat file with one line:
"D:\Program Files\OmniBack\bin\omnirpt" -report list_sessions -timeframe 24 24 | C:\windows\system32\blat -subject "Data Protector rapport" -to X.X@xxx.nl
The scheduling runs without any errors but no mail is send out, when running the bat file from a prompt (manual) it works fine.
I split the "problem" in two by running the command until the piping in the bat file scheduled, no problem.
When testing the bat file with only the mail command it fails to send the message out.
C:\windows\system32\blat -subject "Data Protector rapport" -to X.X@xxx.nl
While no errors appeared in logs or anywhere else I captured the output in a file by editting the line:
C:\windows\system32\blat -subject "Data Protector rapport" -to X.X@xxx.nl >> c:\scripts\output.txt
The output file now says:
Blat v3.1.1 (build : Feb 27 2013 20:04:23)
32-bit Windows, Full, Unicode
Failed to open registry key for Blat
To set the SMTP server's name/address and your username/email address for that
server machine do:
blat -install server_name your_email_address
or use '-server <server_name>' and '-f <your_email_address>'
aborting, nothing sent
I tried it with the /c command option in the scheduler al so.
The task is run by a domain account ,the same account is used when manualy running the batch file from a command prompt (as different user)
What goes wrong here?