I have an application that makes use of the registry and it worked fine until I moved to XE8 and Windows 10 64 bit. Now the only way I can get it to work with the registry is to run XE8 as an administrator and recompile the application. Why is that?
The Registry API has not changed. Accessing the Registry works the same regardless of which version of Delphi your app is compiled in. Running the IDE itself as an admin has no effect on whether the compiled app runs as an admin, unless you are running the app inside the IDE's debugger.
Without seeing your actual code, or knowing what Registry key(s) you are trying to access, or even knowing if your app is compiled for 32bit or 64bit, there is no real way to answer your question. All we can do is guess.
You are likely trying to access a Registry key that you do not have access to when running your app as a non-admin. Either the access will simply fail outright, or more likely is being silently redirected by Registry Virtualization, Registry Redirector, or Registry Reflection to another section of the Registry, depending on what the root issue of your problem actually is.
Is there a way to configure XE8 so that it always runs as administrator?
For the IDE itself? Create a shortcut to bds.exe, go into the shortcut Properties, and enable the "Run this program as an administrator" option.
For your app? Add a UAC manifest to your project that sets the requestedExecutionLevel
value to requireAdminstrator
. If you need to debug the app, the IDE has to run as an admin as well.