Admin Offline
|
Yazılar: 1720
Katılım tarihi: Jan 2006
|
Explorer de varsayılan sayfa kısmı kilitlendiyse ve değiştiremiyorsanız,
Kod:
Option Explicit
Dim WSHShell, RegKey, ValueA, Result
On Error Resume Next
Set WSHShell = CreateObject("WScript.Shell")
RegKey = "HKEY_CURRENT_USER\Software\Policies\Microsoft\Inte rnet 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
Bu kodu notepad veya herhangi bir text editöründe yapıştırıp, aktif.vbs olarak kaydedin.Kaydettiğiniz dosyayı tıklayarak çalıştırın.
|