I have a program that registers some .dll files in system registry. I gave the program administrator access on a limited user using windwos manifest, but this only works under Win7.

My problem is that i need the program to be able to do that under XP, VISTA and Win7. Is there any way to give it write permission in system registry programmaticaly?

Sounds dubious, normally a setup takes care of this (so your app won't need to). Perhaps this link on SO may help.