More Group Sites
Education Books
School Rankings
Jobless Net
Better Home
Enviro++
更好教育论坛
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post Go to first unread
hong  
#1 Posted : Saturday, October 6, 2012 7:53:37 AM(UTC)
hong

Rank: Administration

Reputation:

Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor
Joined: 11/23/2008(UTC)
Posts: 522

To change BDE (Borland Database Engine) configuration parameters, UAC (User Account Control) on Windows Vista, Windows 7 (both 32 and 64 bit OS) and onwards needs to be turned off. We can use the following Delphi procedure to disable UAC temporarily (set the argument nUAC to 0) and then re-enable UAC (set nUAC to 1) once the change of the BDE settings is done.
Code:
procedure SetUAC(nUAC : integer);
var
  reg : TRegistry;
  key : string;
begin
  reg := TRegistry.Create;
  with reg do
  begin
    RootKey := HKEY_LOCAL_MACHINE;
    key := '\Software\Microsoft\Windows\CurrentVersion\Policies\System';
    if OpenKey(key, false) then
    begin
      if ValueExists('EnableLUA') then
        reg.WriteInteger('EnableLUA', nUAC)
      {else //comment out for Windows OS prior to Vista as the value doesn't exist; UAC was first introduced on Windows Vista 
        ShowMessage('value not exist.')};
    end
    else
      ShowMessage('Error in opening registry key.');
  end;
  reg.Free;
end;

Edited by user Saturday, October 6, 2012 7:56:06 AM(UTC)  | Reason: Not specified

Sponsor
Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.