- Command1 dan Command2 (button)
- Option1 dan Option2 (Option)
Private Sub Command1_Click()
On Error Resume Next
Shell "regedit.exe", vbNormalFocus
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Caption = " • " & App.Title & " - " & App.LegalCopyright
cek_DisableRegistryTools
End Sub
Sub cek_DisableRegistryTools()
On Error Resume Next
Set codetan = CreateObject("WScript.Shell")
codetx = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools")
If codetx = 1 Then
Option1.Value = "1"
Else
Option2.Value = "1"
End If
End Sub
Private Sub Option1_Click()
Set codetan = CreateObject("WScript.Shell")
If Option1.Value = "1" Then
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools", 1, "REG_DWORD"
codetan.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools", 1, "REG_DWORD"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegedit", 1, "REG_DWORD"
codetan.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegedit", 1, "REG_DWORD"
End If
End Sub
Private Sub Option2_Click()
Set codetan = CreateObject("WScript.Shell")
If Option2.Value = "1" Then
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools", 0, "REG_DWORD"
codetan.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools", 0, "REG_DWORD"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegedit", 0, "REG_DWORD"
codetan.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegedit", 0, "REG_DWORD"
End If
End Sub
Untuk hasil yang telah jadi dpt dilihat dilink berikut ini. Dengan sedikit penambahan aksesoris biar kelihatan cantik.
Selamat mencoba, salam matcodet.