Odds are you're bumping into the 'feature' Prevent the modification of Executables. Easy way to test is to have that process create a .txt file in the directory...if it can...then you have your path/variables set correctly.
If that's the case, there's several strategies for allowing processes to modify executables...each with their own benefits/drawbacks.