cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

EEDK - Trouble getting EEDK to properly execute Batch file

I have a Powershell script I'd like to deploy and I'm having trouble getting it to work on EEDK.  But during my trials of "testing", I have created a simple BAT file with the following below in it.  For some reason, this does not work.  If I run psexec /s /i cmd.exe, then run the batch file there (to force it to run as SYSTEM), it works fine.  I also have made a EEDK with a basic BAT file with only a msiexec command string in it...and that works fine.  But why would the code below not run?

 

Also - Does anyone know if there are logs for EEDK to further investigate errors?

 

Any assistance would be appreciated.

md c:\temp\test-file
echo "blah" >c:\temp\test-file\myfile.txt

 

 

Labels (2)
3 Replies
McAfee Employee cdinet
McAfee Employee
Report Inappropriate Content
Message 2 of 4

Re: EEDK - Trouble getting EEDK to properly execute Batch file

Try this - don't necessarily add the logging to the bat file itself, but add this to the command you are running when you configure it in eedk.  I would put the file in a directory already existing.

batfilename.bat > c:\windows\temp\myfile.txt 2>&1

https://www.robvanderwoude.com/battech_redirection.php

 

 

Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?

Re: EEDK - Trouble getting EEDK to properly execute Batch file

Same issue/result.  I have the same BAT file and in EEDK I select File and then in command to run, I have: "Test1-file.bat > c:\windows\temp\Test1-file.bat 2>&1" (without quotes).  I run on a system and nothing.  If I run via psexec /s /i cmd.exe, it does as we would expect and creates test1-file.bat under c:\windows\temp.

 

2 things I'm trying to understand.  1) Is the batch file even running and if so then 2) does EEDK not allow file-level actions like copy/create files 

 

I was using the echo>>file.txt as a test to see where errors were occurring, but that isn't working nor is trying to do something like copy a file from 1 directory to another.  It makes me think the BAT file isn't even running.  So trying to better understand why a basic BAT wouldn't run when using file-level commands when a basic BAT using a msiexec would.

McAfee Employee cdinet
McAfee Employee
Report Inappropriate Content
Message 4 of 4

Re: EEDK - Trouble getting EEDK to properly execute Batch file

I will try testing that when I am back in the office next week

Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?

More McAfee Tools to Help You
  • How-to: Endpoint Removal Tool
  • Support: Endpoint Security
  • Visit: Business Service Portal
  • More: Search Knowledge Articles
  • ePolicy Orchestrator Support

    • Download the new ePolicy Orchestrator (ePO) Support Center Extension which simplifies ePO management and provides support resources directly in the console. Learn more about ePO Support Center