I don't know if there is a registry entry, that was just a guess.
for boot.ini you probably have to so something like:
ReadEnvStr $0 SystemDrive
MessageBox mb_ok "$0\boot.ini"
on vista, I have no idea, just call BCDEdit with nsExec probably
You need to reboot to disable DEP I think, why not fix the code that has DEP issues instead?
IntOp $PostCount $PostCount + 1