I have Delphi.CPL, currently written with Delphi 7, which needs to update the settings in HKLM (for use by the service application) and which must support Vista, Win7 and Server 2008. This can now be done by adding the RUNASADMIN value for AppCompatFlags / Layers, using a CPL file as a value name. This causes Windows to request elevation for the "obsolete control panel applet."
I need to find a way to build CPL in Delphi 2010 without it becoming obsolete and, if possible, not require a registry installation or upgrade. Adding the usual manifest resource to the DLL / CPL, referencing Common-Controls v6 and "requireAdministrator", does not fix the problem: height is not requested and HKLM access is not available. Both the source and Delphi 2010..CPL can be made to work correctly (after increasing) by going to the file in SYSWOW64, right-clicking and starting "as an administrator".
Later: I found a succinct explanation of why you cannot raise a DLL this way on the forum by posting here .
frogb source
share