Dicas sobre o Internet Explorer 6.0
Caro amigo desculpe a demora para responder mas é que eu não tinha relido o tópico
então ontem que fui ver 27/08/03 então hoje vai o que vc me pediu e mais alguns
comandos para controlar o Internet Explorer 6.0 , algumas chaves de registro mudam
de lugar nas outras versões então é só vc mudar o local da chave pois o valor é o
mesmo.
Segue abaixo um pedaço do codigo fonte de um programa que eu fiz
não está muito organizado mas acho que dá para entender!!!
////////////////Funções para ativar as mudanças do registro /////////////
procedure TPrincipalMain.Aplicar;
var
Reg: Tregistry;
Bit: Boolean;
Download: Variant;
begin
bit:=true; // Variavel para ativar os valores das chaves 1
if CheckListBox1.Checked[0] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoNavButtons´,bit );
closekey;
free;
end;
end;
//Desativa Tela Inteira - F11
if CheckListBox1.Checked[1] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoTheaterMode´, bit );
CloseKey;
free;
end;
end;
//Desabilita a opção de Abrir em nova janela
if CheckListBox1.Checked[2] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoOpeninNewWnd´, bit );
CloseKey;
free;
end;
end;
//Desabilita a opção de mudar a Barra de Ferramentas
if CheckListBox1.Checked[3] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoToolbarOptions´, bit );
CloseKey;
free;
end;
end;
//Desabilita a opção de presonalizar a Barra de Ferramentas
if CheckListBox1.Checked[4] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoToolbarCustomize´, bit );
CloseKey;
free;
end;
end;
//Desabilita função Autocompletar Senhas
if CheckListBox1.Checked[5] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Control Panel´,true);
WriteBool(´FormSuggest Passwords´, bit );
CloseKey;
OpenKey(´\.DEFAULT\Software\Microsoft\Internet Explorer\Main´,true);
WriteString(´FormSuggest Passwords´, pchar(´no´));
WriteString(´Use FormSuggest´, pchar(´yes´));
CloseKey;
Free;
end;
end;
//Desabilita função Autocompletar
if CheckListBox1.Checked[6] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Control Panel´,true);
WriteBool(´FromSuggest´, bit );
CloseKey;
free;
end;
end;
//Desabilita Barra de Ferramentas
if CheckListBox1.Checked[7] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoToolBar´, bit );
CloseKey;
free;
end;
end;
//Desabilita Barra Endereços
if CheckListBox1.Checked[8] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoAddressBar´, bit );
CloseKey;
free;
end;
end;
//Desabilita Barra Link
if CheckListBox1.Checked[9] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoLinksBar´, bit );
CloseKey;
free;
end;
end;
//Desabilita botao direito do menu Contexto
if CheckListBox1.Checked[10] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserContextMenu´, bit );
CloseKey;
free;
end;
end;
//Desabilita Canal do usuario
if CheckListBox1.Checked[11] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions´,true);
WriteBool(´NoChannelUI´, bit );
CloseKey;
free;
end;
end;
//Desabilita comando Abrir
if CheckListBox1.Checked[12] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFileOpen´, bit );
CloseKey;
free;
end;
end;
//Desabilita conexao da internet via Dail-Up
if CheckListBox1.Checked[13] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\SaSkda´,true);
WriteBool(´NoDialUp´, bit );
CloseKey;
free;
end;
end;
// Desabilita Dica do dia
if CheckListBox1.Checked[14] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpItemTipOfTheDay´, bit );
CloseKey;
free;
end;
end;
//Desabilita do menu Exibir - Codigo Fonte
if CheckListBox1.Checked[15] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoViewSource´, bit );
CloseKey;
free;
end;
end;
//Desabilita do menu Ferramentas - Opçoes da internet
if CheckListBox1.Checked[16] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserOptions´, bit );
CloseKey;
free;
end;
end;
//Desabilita downloads pelo Internet Explorer
if CheckListBox1.Checked[17] then
begin
Download:=3;
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3´,true);
WriteInteger(´1803´, Download );
CloseKey;
free;
end;
end;
//Desabilita entrar no menu Ajuda
if CheckListBox1.Checked[18] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpMenu´, bit );
CloseKey;
free;
end;
end;
//Desabilita do menu Ajuda - Para usuário do Netscape
if CheckListBox1.Checked[19] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpItemNetscapeHelp´, bit );
CloseKey;
free;
end;
end;
//Desabilita expansão do menu Arquivo - Novo
if CheckListBox1.Checked[20] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoExpandedNewMenu´, bit );
CloseKey;
free;
end;
end;
//Desabilita Favotitos
if CheckListBox1.Checked[21] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFavorites´, bit );
CloseKey;
free;
end;
end;
//Desabilita comado Fechar
if CheckListBox1.Checked[22] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserClose´, bit );
CloseKey;
free;
end;
end;
//Desabilita MSN
if CheckListBox1.Checked[23] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Messenger\Client´,true);
WriteBool(´PreventAutoRun´, bit );
WriteBool(´PreventRun´, bit );
CloseKey;
free;
end;
end;
// Desabilita do menu Arquivo - Novo documento
if CheckListBox1.Checked[24] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFileNew´, bit );
CloseKey;
free;
end;
end;
//Desabilita opçao de esconder ou mudar a Barra de Ferramentas
if CheckListBox1.Checked[25] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoBandCustomize´, bit );
CloseKey;
free;
end;
end;
//Desabilita Procurar arquivos
if CheckListBox1.Checked[26] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFindFiles´, bit );
CloseKey;
free;
end;
end;
//Desabilita Salvar como
if CheckListBox1.Checked[27] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserSaveAs´, bit );
CloseKey;
free;
end;
end;
//Desabilita salvar paginas completas
if CheckListBox1.Checked[28] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions´,true);
WriteBool(´NoBrowserSaveWebComplete´, bit );
CloseKey;
free;
end;
end;
//Desabilita seleçao do diretorio para download
if CheckListBox1.Checked[29] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoSelectDownloadDir´, bit );
CloseKey;
free;
end;
end;
//Desabilita Suporte on-line
if CheckListBox1.Checked[30] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpItemSendFeedback´, bit );
CloseKey;
free;
end;
end;
//Esconde o icone do Internet Explorer no desktop
if CheckListBox1.Checked[31] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoInternetIcon´, bit );
CloseKey;
free;
end;
end;
//Remove botao Correio da Barra de Ferramentas
if CheckListBox1.Checked[33] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´RestGoMenu´, bit );
CloseKey;
free;
end;
end;
//Remove o botao e o menu Impressora
if CheckListBox1.Checked[34] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoPrinting´, bit );
CloseKey;
free;
end;
end;
//Remove a Senha do Administrador de Conteúdo do Internet Explorer
if CheckListBox1.Checked[35] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_LOCAL_MACHINE;
Openkey(´\Software\Microsoft\Windows\CurrentVersion\Policies\Ratings´,true);
DeleteValue(´key´);
closekey;
free;
CheckListBox1.Checked[35]:=false;
end;
end;
//Esvazia os arquivos temporarios ao sair
if CheckListBox1.Checked[32] then
begin
bit:=false;
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache´,true);
WriteBool(´Persistent´, bit );
CloseKey;
free;
end;
end;
StatusBar1.SimpleText:=´Algumas aplicações só serão efetuadas após reiniciar´
end;
////////////////Funções para desativar as mudanças do registro ///////////////
procedure TPrincipalMain.Desativar;
var
Reg: Tregistry;
Bit: Boolean;
Download: Variant;
begin
StatusBar1.SimpleText:=´Algumas aplicações só seram removidas após reiniciar´;
bit:=false; // Variavel com o valor ´0´ para destivar as funções no registro
if CheckListBox1.Checked[0] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoNavButtons´,bit );
closekey;
free;
CheckListBox1.Checked[0]:=false;
end;
end;
//Desativa Tela Inteira - F11
if CheckListBox1.Checked[1] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoTheaterMode´, bit );
CloseKey;
free;
CheckListBox1.Checked[1]:=false;
end;
end;
//Desabilita a opção de Abrir em nova janela
if CheckListBox1.Checked[2] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoOpeninNewWnd´, bit );
CloseKey;
free;
CheckListBox1.Checked[2]:=false;
end;
end;
//Desabilita a opção de mudar a Barra de Ferramentas
if CheckListBox1.Checked[3] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoToolbarOptions´, bit );
CloseKey;
free;
CheckListBox1.Checked[3]:=false;
end;
end;
//Desabilita a opção de presonalizar a Barra de Ferramentas
if CheckListBox1.Checked[4] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoToolbarCustomize´, bit );
CloseKey;
free;
CheckListBox1.Checked[4]:=false;
end;
end;
//Desabilita função Autocompletar Senhas
if CheckListBox1.Checked[5] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Control Panel´,true);
WriteBool(´FormSuggest Passwords´, bit );
CloseKey;
OpenKey(´\.DEFAULT\Software\Microsoft\Internet Explorer\Main´,true);
WriteString(´FormSuggest Passwords´, pchar(´no´));
WriteString(´Use FormSuggest´, pchar(´yes´));
CloseKey;
Free;
CheckListBox1.Checked[5]:=false;
end;
end;
//Desabilita função Autocompletar
if CheckListBox1.Checked[6] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Control Panel´,true);
WriteBool(´FromSuggest´, bit );
CloseKey;
free;
CheckListBox1.Checked[6]:=false;
end;
end;
//Desabilita Barra de Ferramentas
if CheckListBox1.Checked[7] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoToolBar´, bit );
CloseKey;
free;
CheckListBox1.Checked[7]:=false;
end;
end;
//Desabilita Barra Endereços
if CheckListBox1.Checked[8] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoAddressBar´, bit );
CloseKey;
free;
CheckListBox1.Checked[8]:=false;
end;
end;
//Desabilita Barra Link
if CheckListBox1.Checked[9] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoLinksBar´, bit );
CloseKey;
free;
CheckListBox1.Checked[9]:=false;
end;
end;
//Desabilita botao direito do menu Contexto
if CheckListBox1.Checked[10] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserContextMenu´, bit );
CloseKey;
free;
CheckListBox1.Checked[10]:=false;
end;
end;
//Desabilita Canal do usuario
if CheckListBox1.Checked[11] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions´,true);
WriteBool(´NoChannelUI´, bit );
CloseKey;
free;
CheckListBox1.Checked[11]:=false;
end;
end;
//Desabilita comando Abrir
if CheckListBox1.Checked[12] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFileOpen´, bit );
CloseKey;
free;
CheckListBox1.Checked[12]:=false;
end;
end;
//Desabilita conexao da internet via Dail-Up
if CheckListBox1.Checked[13] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\SaSkda´,true);
WriteBool(´NoDialUp´, bit );
CloseKey;
free;
CheckListBox1.Checked[13]:=false;
end;
end;
// Desabilita Dica do dia
if CheckListBox1.Checked[14] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpItemTipOfTheDay´, bit );
CloseKey;
free;
CheckListBox1.Checked[14]:=false;
end;
end;
//Desabilita do menu Exibir - Codigo Fonte
if CheckListBox1.Checked[15] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoViewSource´, bit );
CloseKey;
free;
CheckListBox1.Checked[15]:=false;
end;
end;
//Desabilita do menu Ferramentas - Opçoes da internet
if CheckListBox1.Checked[16] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserOptions´, bit );
CloseKey;
free;
CheckListBox1.Checked[16]:=false;
end;
end;
//Desabilita downloads pelo Internet Explorer
if CheckListBox1.Checked[17] then
begin
Download:=0;
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3´,true);
WriteInteger(´1803´, Download );
CloseKey;
free;
CheckListBox1.Checked[17]:=false;
end;
end;
//Desabilita entrar no menu Ajuda
if CheckListBox1.Checked[18] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpMenu´, bit );
CloseKey;
free;
CheckListBox1.Checked[18]:=false;
end;
end;
//Desabilita do menu Ajuda - Para usuário do Netscape
if CheckListBox1.Checked[19] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpItemNetscapeHelp´, bit );
CloseKey;
free;
CheckListBox1.Checked[19]:=false;
end;
end;
//Desabilita expansão do menu Arquivo - Novo
if CheckListBox1.Checked[20] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoExpandedNewMenu´, bit );
CloseKey;
free;
CheckListBox1.Checked[20]:=false;
end;
end;
//Desabilita Favotitos
if CheckListBox1.Checked[21] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFavorites´, bit );
CloseKey;
free;
CheckListBox1.Checked[21]:=false;
end;
end;
//Desabilita comado Fechar
if CheckListBox1.Checked[22] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserClose´, bit );
CloseKey;
free;
CheckListBox1.Checked[22]:=false;
end;
end;
//Desabilita MSN
if CheckListBox1.Checked[23] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Messenger\Client´,true);
WriteBool(´PreventAutoRun´, bit );
WriteBool(´PreventRun´, bit );
CloseKey;
free;
CheckListBox1.Checked[23]:=false;
end;
end;
// Desabilita do menu Arquivo - Novo documento
if CheckListBox1.Checked[24] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFileNew´, bit );
CloseKey;
free;
CheckListBox1.Checked[24]:=false;
end;
end;
//Desabilita opçao de esconder ou mudar a Barra de Ferramentas
if CheckListBox1.Checked[25] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoBandCustomize´, bit );
CloseKey;
free;
CheckListBox1.Checked[25]:=false;
end;
end;
//Desabilita Procurar arquivos
if CheckListBox1.Checked[26] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFindFiles´, bit );
CloseKey;
free;
CheckListBox1.Checked[26]:=false;
end;
end;
//Desabilita Salvar como
if CheckListBox1.Checked[27] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserSaveAs´, bit );
CloseKey;
free;
CheckListBox1.Checked[27]:=false;
end;
end;
//Desabilita salvar paginas completas
if CheckListBox1.Checked[28] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions´,true);
WriteBool(´NoBrowserSaveWebComplete´, bit );
CloseKey;
free;
CheckListBox1.Checked[28]:=false;
end;
end;
//Desabilita seleçao do diretorio para download
if CheckListBox1.Checked[29] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoSelectDownloadDir´, bit );
CloseKey;
free;
CheckListBox1.Checked[29]:=false;
end;
end;
//Desabilita Suporte on-line
if CheckListBox1.Checked[30] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpItemSendFeedback´, bit );
CloseKey;
free;
CheckListBox1.Checked[30]:=false;
end;
end;
//Esconde o icone do Internet Explorer no desktop
if CheckListBox1.Checked[31] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoInternetIcon´, bit );
CloseKey;
free;
CheckListBox1.Checked[31]:=false;
end;
end;
//Remove botao Correio da Barra de Ferramentas
if CheckListBox1.Checked[33] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´RestGoMenu´, bit );
CloseKey;
free;
CheckListBox1.Checked[33]:=false;
end;
end;
//Remove o botao e o menu Impressora
if CheckListBox1.Checked[34] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoPrinting´, bit );
CloseKey;
free;
CheckListBox1.Checked[34]:=false;
end;
end;
//Senha do Administrador de Conteúdo
if CheckListBox1.Checked[35] then
begin
MessageDlg(´A Senha do Administrador de Conteúdo só pode ser desativada pelo Controle Total 1.0´,mtWarning,[mbok],0);
CheckListBox1.Checked[35]:=false;
end;
//Esvazia os arquivos temporarios ao sair
if CheckListBox1.Checked[32] then
begin
bit:=true;
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache´,true);
WriteBool(´Persistent´, bit );
CloseKey;
free;
CheckListBox1.Checked[32]:= false;
end;
end;
end;
Rafael Roni de Oliveira (Iniciante neste grande Mundo DELPHI)
mailto:wallldo2003@yahoo.com.br
então ontem que fui ver 27/08/03 então hoje vai o que vc me pediu e mais alguns
comandos para controlar o Internet Explorer 6.0 , algumas chaves de registro mudam
de lugar nas outras versões então é só vc mudar o local da chave pois o valor é o
mesmo.
Segue abaixo um pedaço do codigo fonte de um programa que eu fiz
não está muito organizado mas acho que dá para entender!!!
////////////////Funções para ativar as mudanças do registro /////////////
procedure TPrincipalMain.Aplicar;
var
Reg: Tregistry;
Bit: Boolean;
Download: Variant;
begin
bit:=true; // Variavel para ativar os valores das chaves 1
if CheckListBox1.Checked[0] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoNavButtons´,bit );
closekey;
free;
end;
end;
//Desativa Tela Inteira - F11
if CheckListBox1.Checked[1] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoTheaterMode´, bit );
CloseKey;
free;
end;
end;
//Desabilita a opção de Abrir em nova janela
if CheckListBox1.Checked[2] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoOpeninNewWnd´, bit );
CloseKey;
free;
end;
end;
//Desabilita a opção de mudar a Barra de Ferramentas
if CheckListBox1.Checked[3] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoToolbarOptions´, bit );
CloseKey;
free;
end;
end;
//Desabilita a opção de presonalizar a Barra de Ferramentas
if CheckListBox1.Checked[4] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoToolbarCustomize´, bit );
CloseKey;
free;
end;
end;
//Desabilita função Autocompletar Senhas
if CheckListBox1.Checked[5] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Control Panel´,true);
WriteBool(´FormSuggest Passwords´, bit );
CloseKey;
OpenKey(´\.DEFAULT\Software\Microsoft\Internet Explorer\Main´,true);
WriteString(´FormSuggest Passwords´, pchar(´no´));
WriteString(´Use FormSuggest´, pchar(´yes´));
CloseKey;
Free;
end;
end;
//Desabilita função Autocompletar
if CheckListBox1.Checked[6] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Control Panel´,true);
WriteBool(´FromSuggest´, bit );
CloseKey;
free;
end;
end;
//Desabilita Barra de Ferramentas
if CheckListBox1.Checked[7] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoToolBar´, bit );
CloseKey;
free;
end;
end;
//Desabilita Barra Endereços
if CheckListBox1.Checked[8] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoAddressBar´, bit );
CloseKey;
free;
end;
end;
//Desabilita Barra Link
if CheckListBox1.Checked[9] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoLinksBar´, bit );
CloseKey;
free;
end;
end;
//Desabilita botao direito do menu Contexto
if CheckListBox1.Checked[10] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserContextMenu´, bit );
CloseKey;
free;
end;
end;
//Desabilita Canal do usuario
if CheckListBox1.Checked[11] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions´,true);
WriteBool(´NoChannelUI´, bit );
CloseKey;
free;
end;
end;
//Desabilita comando Abrir
if CheckListBox1.Checked[12] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFileOpen´, bit );
CloseKey;
free;
end;
end;
//Desabilita conexao da internet via Dail-Up
if CheckListBox1.Checked[13] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\SaSkda´,true);
WriteBool(´NoDialUp´, bit );
CloseKey;
free;
end;
end;
// Desabilita Dica do dia
if CheckListBox1.Checked[14] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpItemTipOfTheDay´, bit );
CloseKey;
free;
end;
end;
//Desabilita do menu Exibir - Codigo Fonte
if CheckListBox1.Checked[15] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoViewSource´, bit );
CloseKey;
free;
end;
end;
//Desabilita do menu Ferramentas - Opçoes da internet
if CheckListBox1.Checked[16] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserOptions´, bit );
CloseKey;
free;
end;
end;
//Desabilita downloads pelo Internet Explorer
if CheckListBox1.Checked[17] then
begin
Download:=3;
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3´,true);
WriteInteger(´1803´, Download );
CloseKey;
free;
end;
end;
//Desabilita entrar no menu Ajuda
if CheckListBox1.Checked[18] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpMenu´, bit );
CloseKey;
free;
end;
end;
//Desabilita do menu Ajuda - Para usuário do Netscape
if CheckListBox1.Checked[19] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpItemNetscapeHelp´, bit );
CloseKey;
free;
end;
end;
//Desabilita expansão do menu Arquivo - Novo
if CheckListBox1.Checked[20] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoExpandedNewMenu´, bit );
CloseKey;
free;
end;
end;
//Desabilita Favotitos
if CheckListBox1.Checked[21] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFavorites´, bit );
CloseKey;
free;
end;
end;
//Desabilita comado Fechar
if CheckListBox1.Checked[22] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserClose´, bit );
CloseKey;
free;
end;
end;
//Desabilita MSN
if CheckListBox1.Checked[23] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Messenger\Client´,true);
WriteBool(´PreventAutoRun´, bit );
WriteBool(´PreventRun´, bit );
CloseKey;
free;
end;
end;
// Desabilita do menu Arquivo - Novo documento
if CheckListBox1.Checked[24] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFileNew´, bit );
CloseKey;
free;
end;
end;
//Desabilita opçao de esconder ou mudar a Barra de Ferramentas
if CheckListBox1.Checked[25] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoBandCustomize´, bit );
CloseKey;
free;
end;
end;
//Desabilita Procurar arquivos
if CheckListBox1.Checked[26] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFindFiles´, bit );
CloseKey;
free;
end;
end;
//Desabilita Salvar como
if CheckListBox1.Checked[27] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserSaveAs´, bit );
CloseKey;
free;
end;
end;
//Desabilita salvar paginas completas
if CheckListBox1.Checked[28] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions´,true);
WriteBool(´NoBrowserSaveWebComplete´, bit );
CloseKey;
free;
end;
end;
//Desabilita seleçao do diretorio para download
if CheckListBox1.Checked[29] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoSelectDownloadDir´, bit );
CloseKey;
free;
end;
end;
//Desabilita Suporte on-line
if CheckListBox1.Checked[30] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpItemSendFeedback´, bit );
CloseKey;
free;
end;
end;
//Esconde o icone do Internet Explorer no desktop
if CheckListBox1.Checked[31] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoInternetIcon´, bit );
CloseKey;
free;
end;
end;
//Remove botao Correio da Barra de Ferramentas
if CheckListBox1.Checked[33] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´RestGoMenu´, bit );
CloseKey;
free;
end;
end;
//Remove o botao e o menu Impressora
if CheckListBox1.Checked[34] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoPrinting´, bit );
CloseKey;
free;
end;
end;
//Remove a Senha do Administrador de Conteúdo do Internet Explorer
if CheckListBox1.Checked[35] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_LOCAL_MACHINE;
Openkey(´\Software\Microsoft\Windows\CurrentVersion\Policies\Ratings´,true);
DeleteValue(´key´);
closekey;
free;
CheckListBox1.Checked[35]:=false;
end;
end;
//Esvazia os arquivos temporarios ao sair
if CheckListBox1.Checked[32] then
begin
bit:=false;
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache´,true);
WriteBool(´Persistent´, bit );
CloseKey;
free;
end;
end;
StatusBar1.SimpleText:=´Algumas aplicações só serão efetuadas após reiniciar´
end;
////////////////Funções para desativar as mudanças do registro ///////////////
procedure TPrincipalMain.Desativar;
var
Reg: Tregistry;
Bit: Boolean;
Download: Variant;
begin
StatusBar1.SimpleText:=´Algumas aplicações só seram removidas após reiniciar´;
bit:=false; // Variavel com o valor ´0´ para destivar as funções no registro
if CheckListBox1.Checked[0] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoNavButtons´,bit );
closekey;
free;
CheckListBox1.Checked[0]:=false;
end;
end;
//Desativa Tela Inteira - F11
if CheckListBox1.Checked[1] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoTheaterMode´, bit );
CloseKey;
free;
CheckListBox1.Checked[1]:=false;
end;
end;
//Desabilita a opção de Abrir em nova janela
if CheckListBox1.Checked[2] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoOpeninNewWnd´, bit );
CloseKey;
free;
CheckListBox1.Checked[2]:=false;
end;
end;
//Desabilita a opção de mudar a Barra de Ferramentas
if CheckListBox1.Checked[3] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoToolbarOptions´, bit );
CloseKey;
free;
CheckListBox1.Checked[3]:=false;
end;
end;
//Desabilita a opção de presonalizar a Barra de Ferramentas
if CheckListBox1.Checked[4] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoToolbarCustomize´, bit );
CloseKey;
free;
CheckListBox1.Checked[4]:=false;
end;
end;
//Desabilita função Autocompletar Senhas
if CheckListBox1.Checked[5] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Control Panel´,true);
WriteBool(´FormSuggest Passwords´, bit );
CloseKey;
OpenKey(´\.DEFAULT\Software\Microsoft\Internet Explorer\Main´,true);
WriteString(´FormSuggest Passwords´, pchar(´no´));
WriteString(´Use FormSuggest´, pchar(´yes´));
CloseKey;
Free;
CheckListBox1.Checked[5]:=false;
end;
end;
//Desabilita função Autocompletar
if CheckListBox1.Checked[6] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Control Panel´,true);
WriteBool(´FromSuggest´, bit );
CloseKey;
free;
CheckListBox1.Checked[6]:=false;
end;
end;
//Desabilita Barra de Ferramentas
if CheckListBox1.Checked[7] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoToolBar´, bit );
CloseKey;
free;
CheckListBox1.Checked[7]:=false;
end;
end;
//Desabilita Barra Endereços
if CheckListBox1.Checked[8] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoAddressBar´, bit );
CloseKey;
free;
CheckListBox1.Checked[8]:=false;
end;
end;
//Desabilita Barra Link
if CheckListBox1.Checked[9] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions´,true);
WriteBool(´NoLinksBar´, bit );
CloseKey;
free;
CheckListBox1.Checked[9]:=false;
end;
end;
//Desabilita botao direito do menu Contexto
if CheckListBox1.Checked[10] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserContextMenu´, bit );
CloseKey;
free;
CheckListBox1.Checked[10]:=false;
end;
end;
//Desabilita Canal do usuario
if CheckListBox1.Checked[11] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions´,true);
WriteBool(´NoChannelUI´, bit );
CloseKey;
free;
CheckListBox1.Checked[11]:=false;
end;
end;
//Desabilita comando Abrir
if CheckListBox1.Checked[12] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFileOpen´, bit );
CloseKey;
free;
CheckListBox1.Checked[12]:=false;
end;
end;
//Desabilita conexao da internet via Dail-Up
if CheckListBox1.Checked[13] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\SaSkda´,true);
WriteBool(´NoDialUp´, bit );
CloseKey;
free;
CheckListBox1.Checked[13]:=false;
end;
end;
// Desabilita Dica do dia
if CheckListBox1.Checked[14] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpItemTipOfTheDay´, bit );
CloseKey;
free;
CheckListBox1.Checked[14]:=false;
end;
end;
//Desabilita do menu Exibir - Codigo Fonte
if CheckListBox1.Checked[15] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoViewSource´, bit );
CloseKey;
free;
CheckListBox1.Checked[15]:=false;
end;
end;
//Desabilita do menu Ferramentas - Opçoes da internet
if CheckListBox1.Checked[16] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserOptions´, bit );
CloseKey;
free;
CheckListBox1.Checked[16]:=false;
end;
end;
//Desabilita downloads pelo Internet Explorer
if CheckListBox1.Checked[17] then
begin
Download:=0;
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3´,true);
WriteInteger(´1803´, Download );
CloseKey;
free;
CheckListBox1.Checked[17]:=false;
end;
end;
//Desabilita entrar no menu Ajuda
if CheckListBox1.Checked[18] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpMenu´, bit );
CloseKey;
free;
CheckListBox1.Checked[18]:=false;
end;
end;
//Desabilita do menu Ajuda - Para usuário do Netscape
if CheckListBox1.Checked[19] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpItemNetscapeHelp´, bit );
CloseKey;
free;
CheckListBox1.Checked[19]:=false;
end;
end;
//Desabilita expansão do menu Arquivo - Novo
if CheckListBox1.Checked[20] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoExpandedNewMenu´, bit );
CloseKey;
free;
CheckListBox1.Checked[20]:=false;
end;
end;
//Desabilita Favotitos
if CheckListBox1.Checked[21] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFavorites´, bit );
CloseKey;
free;
CheckListBox1.Checked[21]:=false;
end;
end;
//Desabilita comado Fechar
if CheckListBox1.Checked[22] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserClose´, bit );
CloseKey;
free;
CheckListBox1.Checked[22]:=false;
end;
end;
//Desabilita MSN
if CheckListBox1.Checked[23] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Messenger\Client´,true);
WriteBool(´PreventAutoRun´, bit );
WriteBool(´PreventRun´, bit );
CloseKey;
free;
CheckListBox1.Checked[23]:=false;
end;
end;
// Desabilita do menu Arquivo - Novo documento
if CheckListBox1.Checked[24] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFileNew´, bit );
CloseKey;
free;
CheckListBox1.Checked[24]:=false;
end;
end;
//Desabilita opçao de esconder ou mudar a Barra de Ferramentas
if CheckListBox1.Checked[25] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoBandCustomize´, bit );
CloseKey;
free;
CheckListBox1.Checked[25]:=false;
end;
end;
//Desabilita Procurar arquivos
if CheckListBox1.Checked[26] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoFindFiles´, bit );
CloseKey;
free;
CheckListBox1.Checked[26]:=false;
end;
end;
//Desabilita Salvar como
if CheckListBox1.Checked[27] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoBrowserSaveAs´, bit );
CloseKey;
free;
CheckListBox1.Checked[27]:=false;
end;
end;
//Desabilita salvar paginas completas
if CheckListBox1.Checked[28] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions´,true);
WriteBool(´NoBrowserSaveWebComplete´, bit );
CloseKey;
free;
CheckListBox1.Checked[28]:=false;
end;
end;
//Desabilita seleçao do diretorio para download
if CheckListBox1.Checked[29] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoSelectDownloadDir´, bit );
CloseKey;
free;
CheckListBox1.Checked[29]:=false;
end;
end;
//Desabilita Suporte on-line
if CheckListBox1.Checked[30] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoHelpItemSendFeedback´, bit );
CloseKey;
free;
CheckListBox1.Checked[30]:=false;
end;
end;
//Esconde o icone do Internet Explorer no desktop
if CheckListBox1.Checked[31] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer´,true);
WriteBool(´NoInternetIcon´, bit );
CloseKey;
free;
CheckListBox1.Checked[31]:=false;
end;
end;
//Remove botao Correio da Barra de Ferramentas
if CheckListBox1.Checked[33] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´RestGoMenu´, bit );
CloseKey;
free;
CheckListBox1.Checked[33]:=false;
end;
end;
//Remove o botao e o menu Impressora
if CheckListBox1.Checked[34] then
begin
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Policies\Microsoft\Internet Explorer\Restrictions´,true);
WriteBool(´NoPrinting´, bit );
CloseKey;
free;
CheckListBox1.Checked[34]:=false;
end;
end;
//Senha do Administrador de Conteúdo
if CheckListBox1.Checked[35] then
begin
MessageDlg(´A Senha do Administrador de Conteúdo só pode ser desativada pelo Controle Total 1.0´,mtWarning,[mbok],0);
CheckListBox1.Checked[35]:=false;
end;
//Esvazia os arquivos temporarios ao sair
if CheckListBox1.Checked[32] then
begin
bit:=true;
Reg:=Tregistry.create;
with Reg do
begin
rootkey:=HKEY_USERS;
Openkey(´\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache´,true);
WriteBool(´Persistent´, bit );
CloseKey;
free;
CheckListBox1.Checked[32]:= false;
end;
end;
end;
Rafael Roni de Oliveira (Iniciante neste grande Mundo DELPHI)
mailto:wallldo2003@yahoo.com.br
Rafael Roni
Curtidas 0