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
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?
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.
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?
Bump. Did you (or anyone) get a chance to try this out.
So sorry, I must have overlooked this. Let me work on it today.
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?
Ok, I created a bat file with exact parameters that you had in your test that you posted. The command to run was test.bat, checked it into epo, replicated to distributed repos and deployed it to my test server (win 2016). It created the folder and the file successfully. I did the same thing to Windows 10 system and it also created the file successfully. So, bat files do run - possibly something in the way you have the eedk package configured? I am attaching mine as a sample for you to compare.
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?
New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.
Thousands of customers use our Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership: