- ie close button disable
procedure TForm1.Button1Click(Sender: TObject);
var
Ole1: OleVariant;
reg:tregistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CURRENT_USER ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('01');
reg.WriteInteger('NoBrowserClose',ole1);
reg.RootKey:=HKEY_local_machine ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('01');
reg.WriteInteger('NoBrowserClose',ole1);
reg.Free;
end;
----------------------------------------------------------------------
- ie close button enable
procedure TForm1.Button2Click(Sender: TObject);
var
Ole1: OleVariant;
reg:tregistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CURRENT_USER ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('00');
reg.WriteInteger('NoBrowserClose',ole1);
reg.RootKey:=HKEY_local_machine ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('00');
reg.WriteInteger('NoBrowserClose',ole1);
reg.Free;
end;
----------------------------------------------------------------------
-ie options disable
procedure TForm1.Button5Click(Sender: TObject);
var
Ole1: OleVariant;
reg:tregistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CURRENT_USER ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('01');
reg.WriteInteger('NoBrowserOptions',ole1);
reg.RootKey:=HKEY_local_machine ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('01');
reg.WriteInteger('NoBrowserOptions',ole1);
reg.Free;
end;
----------------------------------------------------------------------
-ie options enable
procedure TForm1.Button6Click(Sender: TObject);
var
Ole1: OleVariant;
reg:tregistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CURRENT_USER ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('00');
reg.WriteInteger('NoBrowserOptions',ole1);
reg.RootKey:=HKEY_local_machine ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('00');
reg.WriteInteger('NoBrowserOptions',ole1);
reg.Free;
end;
----------------------------------------------------------------------
-disable ie save file in directory
procedure TForm1.Button7Click(Sender: TObject);
var
Ole1: OleVariant;
reg:tregistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CURRENT_USER ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('01');
reg.WriteInteger('NoSelectDownloadDir',ole1);
reg.RootKey:=HKEY_local_machine ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('01');
reg.WriteInteger('NoSelectDownloadDir',ole1);
reg.Free;
end;
----------------------------------------------------------------------
-enable ie save file in directory
procedure TForm1.Button16Click(Sender: TObject);
var
Ole1: OleVariant;
reg:tregistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CURRENT_USER ;
reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Policies\System',true);
ole1:= ('00');
reg.WriteInteger('NoDispBackgroundPage',ole1);
reg.RootKey:=HKEY_local_machine ;
reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Policies\System',true);
ole1:= ('00');
reg.WriteInteger('NoDispBackgroundPage',ole1);
reg.Free;
end;
----------------------------------------------------------------------
-disable background tab properties
procedure TForm1.Button15Click(Sender: TObject);
var
Ole1: OleVariant;
reg:tregistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CURRENT_USER ;
reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Policies\System',true);
ole1:= ('01');
reg.WriteInteger('NoDispBackgroundPage',ole1);
reg.RootKey:=HKEY_local_machine ;
reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Policies\System',true);
ole1:= ('01');
reg.WriteInteger('NoDispBackgroundPage',ole1);
reg.Free;
end;
----------------------------------------------------------------------
- disable ie favourites
procedure TForm1.Button3Click(Sender: TObject);
var
Ole1: OleVariant;
reg:tregistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CURRENT_USER ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('01');
reg.WriteInteger('NoFavorites',ole1);
reg.RootKey:=HKEY_local_machine ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('01');
reg.WriteInteger('NoFavorites',ole1);
reg.Free;
end;
----------------------------------------------------------------------
- enable ie favourites
procedure TForm1.Button4Click(Sender: TObject);
var
Ole1: OleVariant;
reg:tregistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CURRENT_USER ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('00');
reg.WriteInteger('NoFavorites',ole1);
reg.RootKey:=HKEY_local_machine ;
reg.OpenKey('Software\Policies\Microsoft\Internet Explorer\Restrictions',true);
ole1:= ('00');
reg.WriteInteger('NoFavorites',ole1);
reg.Free;
end;
----------------------------------------------------------------------
-get default browser
procedure TForm1.Button12Click(Sender: TObject);
var Reg : TRegistry;
s : string ;
begin
ListBox1.clear;
//--search BROWSER TYPE
reg:=tregistry.create;
reg.RootKey:= hkey_Local_machine;
if reg.openkey('Software\Microsoft\IE Setup\Setup',true) then
s:=reg.ReadString('PreDefaultBrowser');
ListBox1.text := 'Default Browser : '+s ;
reg.closekey;
end;
----------------------------------------------------------------------