I have a weird configuration issue with IIS...

My PHP script does an Exec() of a Win32 utility executable that reads and modifies the registry. The registry reads work fine, but when modifying, the executable errors out with an error 5 ("Access denied").

This despite the fact that I've added the anonymous user to the admin group, made sure that the folder is accessible to the anonymous user, etc. Basically have given the anonymous user - at least for testing purposes - full power on the box.

So... why can't PHP get the executable to run in the correct security context?

Any ideas appreciated.

    Check permissions for the registry key you're trying to modify.

    Use the "regedt32.exe" utility instead of regedit.exe.

    Security logs in Event Viewer also might help if you have enabled auditing (Computer Managment > Local Security Policies > Audit Policy > Audit object access -> check 'Failure').

      Write a Reply...