Issue running Batch file on the End Point using Bigfix Task

Hello All
Very Good Day !

I am trying to run a batch file via Bigfix Task and it is failing to make the required changes on the end point though the job runs success with exit code 0 .
We try run the same file which is copied on to the end point using Fixlet debugger it is working file…
But when run using Bigfix is not working as expected… Need help in fixing the issue…
Below is the command lines which run on the End Pointe after running Prefetch and Extract in __Download folder.

override wait
completion=job
hidden=true
runas=agent
wait cmd.exe /c mkdir "C:\temp\w32timeupdate"
wait cmd.exe /c move “__Download*.*” "C:\temp\w32timeupdate"
wait cmd.exe /c “C:\temp\w32timeupdate\w32timeupdate.bat”

I have also tried to run the batch file from __Download folder instead of moving to a temp directory… Still the issue was same. The job status is success on the console but changes did not happen on the end point…

I understand that Bigfix will run /execute the Tasks on the end point using Local Admin credentials ,in that case it should have elevated rites to perform the job , but not sure why it is not working…

Why not just have to create the batch file file and then run it? The command runs by system by default which has similar permissions to local administrator.

// Disable wow64 redirection on x64 OSes
action uses wow64 redirection {not x64 of operating system}

delete __createfile

// CREATEFILE
createfile until END_OF_FILE

batch file contents here

END_OF_FILE

delete w32timeupdate.bat
move __createfile w32timeupdate.bat

override wait
hidden=true
completion=job
wait w32timeupdate.bat

Hello Cjwolford
Very Good Day !!
Thank you so much for your reply … Actually . The Batch file is calling a ps1 file, which we have tried to run powershell script as part of action script and it is failing on windows 2008 servers… So happened to try to run that ps1 file using batch file… Which is running fine on the end point using debugger but failing via task…

are you using the standard run powershell template?

http://bigfix.me/fixlet/details/633

Other than that maybe the commands you’re trying to run aren’t supported on the version of powershell since you’re saying it’s 2008 servers that are failing.

I’d wager the most important point is the first line of cjwolford’s response – disable wow64 redirection. Otherwise you’re running the 32-bit CMD.exe, 32-bit powershell.exe, and 32-bit w32time.exe

2 Likes

Thank you for your reply Jason , Disabling wow64 redirection didnt work. Still could not see any changes done using the task
// Disable wow64 redirection on x64 OSes
action uses wow64 redirection {not x64 of operating system}

Have you tried dumping the batch file from wherever it is on your Bigfix server to the C:\temp folder and then calling the program from there?

I’ve had lots of luck copying the file locally first and then calling it from the local folder via a BigFix Action script.

Hello Snojack

yes, tried that way, using Fixlet Debugger and it worked fine… but issue only is when running with Bigfix task, where it is not doing required changes.

Thanks
Vishnu