Using EEDK 9.5.2 and ePO I am trying to deploy a batch file which enables MSMQ service on Windows machines, which seems a simple task, but after 23 failed versions I don't know what to try anymore.
The batch runs fine when I run it as administrator manually on the machine, but fails when deployed from ePO (even though I get a "Completed" response in Server Task Log). I can see a "Generic script error" in McAfee Agent Status Monitor.
The batch file is as follows:
for /f "delims=" %%a in ('cd') do @set SRCDIR=%%a
"%comspec%" /c dism /online /Enable-Feature /FeatureName:MSMQ-Container /Norestart /Quiet
"%comspec%" /c dism /online /Enable-Feature /FeatureName:MSMQ-Server /Norestart /Quiet
I think the batch file isn't run in elevated mode, but as far as I know the SYSTEM account is running the commands and should have administrative privileges.
Any help would be appreciated.