Please see my comment to the question. I think this is not the question to be answered in the forum. It's rather a research and development work to be done. The only reasonable answer would be just doing a considerable part of this work, with, please understand it, would be a bit too much for a forum.
And deleting anything from temporary folder does not really clean the registry. Unfortunately, cleaning the registry is really needed, but this is quite a complex and dangerous activity. If you really want to do it, you have to learn a good deal of system internals, not just techniques, which are actually quite simple. Basically, you need to find out all potential cases of registry inconsistencies and the way of making the registry data self-consistent.
Some inconsistencies are very apparent: for example, you can easily get a lot of data elements pointing to some physically removed files (for example, formally install some software and then remove executable directory; how to return to the consistent Registry as it was before installation?). You can always remove those entries pointing to non-existing files, but how much to remove around them? This is a problem requiring detailed knowledge of relevant registry-stored structures. Many are documented, but I believe some are not. At the very least, you need to do a lot of experiments on the systems you can always rebuild if you screw up. A lot of work, I would say.
I think the only part which makes sense is the last question, about the administrative access. You will really need elevated privileges. In Windows 7 and later (should I even mention such broken thing as Vista? :-)), having administrative account is not enough. You
also will need to ask a user confirmation via UAC:
http://en.wikipedia.org/wiki/User_Account_Control[
^].
Normally, you can run anything "as administrator" on the user level, if your account has sufficient privileges:
http://4sysops.com/archives/vista%E2%80%99s-uac-8-ways-how-to-elevate-an-application-to-run-it-with-administrator-rights/[
^],
http://www.sevenforums.com/tutorials/11841-run-administrator.html[
^].
However, for a system utility this is not good enough, as you always need to "run anything as administrator". So, the right thing would be adding the request right to the
application manifest. Please see:
http://msdn.microsoft.com/en-us/library/bb756929.aspx[
^].
That's all.
—SA