Explorer giris sayfasinin ve regedit'in kitlenmesi

0
Onaylı Üye
Üye
Katılım
12 Aralık 2004
Mesajlar
9,603
Tepki puanı
106
Konum
AZ
Benzer bir sorundan bahseden postta gordugum icin bu basit ipucunu yazayim dedim. Bazi siteler Internet Explorer'in varsayilan giris sayfasini kitlemekte ve duzeltemeyin diye de regedit'i de kitlemektedir.

1) Bunun icin asagidaki kodu text editorunuzde yazip, regedit.vbs diye kaydedip calistirin. Regedit'inizi tekrar aktif hale getirecektir.

Kod:
On Error Resume Next
'Prevents errors from values that don't exist
Set WshShell = WScript.CreateObject("WScript.Shell")
'Delete DisableRegistryTools registry values

WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools"
WshShell.RegDelete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools"

'display message
Message = "You should have access to Regedit now"

X = MsgBox(Message, vbOKOnly, "Done")
Set WshShell = Nothing
Set fso = Nothing

2) Varsayilan sayfa ayariiniz kitliyse ve bu ozelligi acmak istiyorsaniz, asagidaki kodu sayfaduzelt.vbs olarak kaydedip calistirin.

Kod:
Option Explicit
Dim WSHShell, RegKey, ValueA, Result
On Error Resume Next
Set WSHShell = CreateObject("WScript.Shell")
RegKey = "HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel\"
ValueA = WSHShell.RegRead (regkey & "HomePage")

If ValueA = 0 Then 'Change Homepage is Enabled.
Result = MsgBox("Ability to Change Homepage is currently [Enabled]." & _
vbNewLine & "Would you like to Disable?" & _
vbNewLine & "Will lock and Gray it out." & _
vbNewLine & "May need to Log-off for effect.", 36)
If Result = 6 Then 'clicked yes
WSHShell.RegWrite regkey & "HomePage", 1
End If
Else 'Change Homepage is Disabled
Result = MsgBox("Ability to Change Homepage is currently [Disabled]." & _
vbNewLine & "Would you like to Enable?", 36)
If Result = 6 Then 'clicked yes
WshShell.RegDelete "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\HomePage"
'Delete Key cause it don't exist normally
End If
End If
 
0
Onaylı Üye
Üye
Katılım
18 Ocak 2005
Mesajlar
523
Tepki puanı
0
Çok güzel bir paylaşım dostum..

Tebrik ediyorum..
 
Geri
Üst