acilis sayfasi degismeyenlere vbs cözümü

Programlama dilleri konusunda bilgi paylaşım alanıdır.
Cevapla
Kullanıcı avatarı
velociraptor
Yottabyte3
Yottabyte3
Mesajlar: 28764
Kayıt: 14 Mar 2006, 02:33
cinsiyet: Erkek

acilis sayfasi degismeyenlere vbs cözümü

Mesaj gönderen velociraptor » 30 Eyl 2008, 04:16

Asagıdaki kodu .vbs formatında kaydedin ve çalıstırın

Kod: Tümünü seç

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
ALINTIDIR
Knowledge determines destiny, And ye shall know the Truth and the Truth shall make you free



Cevapla