The problem is with the WinUtils.exe. WinUtils.exe used AssignProcessToJobObject() in the createTask() method in task.c file.
In windows 7, If the Jobobject has already a process assigned, then ‘AssignProcessToJobObject’ cannot assign a new process and returns with ‘Access Denied’ message.
So when you called the exe programatically, the jobObject may be already assigned with a ProcessHandle which then returns as "Access Denied" from the 'AssignProcessToJobObject' function.
Fix: Check the JobObject for any associated processes and assign a new process only if the jobObject is not assigned to any. Ensure your changes apply only to the Windows 7 environment and let the default code to be used in the Windows 8 and greater environments.
Hope this helps.