Pada postingan sebelumnya saya memberikan sebuah aplikasi/tools yang bisa digunakan untuk memblock file agar tidak bisa dijalankan, selama nama file tersebut tidak diganti (rename). Tools tersebut bisa digunakan dalam hal memproteksi file system yang berada di pc teman, misalkan regedit.exe, taskmanager, dan lain sebagainya. Memang tidak terproteksi 100% tetapi setidaknya ada sedikit pengamanan bagi pc kita terhadap user yang jahil.
berikut ini akan saya sampaikan source dari aplikasi yang saya posting sebelumnya, menggunakan VB6. Adapun komponen yang diperlukan adalah sebagai berikut :
- check1 (type : CheckBox)
- text1 (type : TextBox)
- text2 (type : TextBox)
- text3 (type : TextBox)
- text4 (type : TextBox)
- text5 (type : TextBox)
- text6 (type : TextBox)
- text7 (type : TextBox)
- text8 (type : TextBox)
- text9 (type : TextBox)
- text10 (type : TextBox)
- command1 (type : CommandButton)
- command2 (type : CommandButton)
Source ini merupakan kerangka, ada baiknya jika teman memolesnya menjadi suatu aplikasi yang tampil indah. Berikur isi source nya :
Private Sub Form_Load()Aplikasi yang dimaksud dalam tampilan setelah didandani :
Me.Caption = " • " & App.Title & " - " & App.CompanyName
periksa_DisallowRun
baca_DisallowRun
End Sub
Private Sub Check1_Click()
On Error Resume Next
Set codetan = CreateObject("WScript.Shell")
If Check1.Value = "1" Then
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun", 1, "REG_DWORD"
End If
If Check1.Value = "0" Then
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun", 0, "REG_DWORD"
End If
periksa_DisallowRun2
End Sub
Sub periksa_DisallowRun2()
On Error Resume Next
Set codetan = CreateObject("WScript.Shell")
DisallowRun = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun")
If DisallowRun = 1 Then
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text6.Enabled = True
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text10.Enabled = True
Command1.Enabled = True
Command2.Enabled = True
Else
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
End If
End Sub
Sub periksa_DisallowRun()
On Error Resume Next
Set codetan = CreateObject("WScript.Shell")
DisallowRun = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun")
If DisallowRun = 1 Then
Check1.Value = "1"
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text6.Enabled = True
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text10.Enabled = True
Command1.Enabled = True
Command2.Enabled = True
Else
Check1.Value = "0"
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
End If
End Sub
Sub baca_DisallowRun()
On Error Resume Next
Set codetan = CreateObject("WScript.Shell")
DisallowRun0 = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\0")
DisallowRun1 = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\1")
DisallowRun2 = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\2")
DisallowRun3 = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\3")
DisallowRun4 = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\4")
DisallowRun5 = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\5")
DisallowRun6 = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\6")
DisallowRun7 = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\7")
DisallowRun8 = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\8")
DisallowRun9 = codetan.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\9")
Text1.Text = DisallowRun0
Text2.Text = DisallowRun1
Text3.Text = DisallowRun2
Text4.Text = DisallowRun3
Text5.Text = DisallowRun4
Text6.Text = DisallowRun5
Text7.Text = DisallowRun6
Text8.Text = DisallowRun7
Text9.Text = DisallowRun8
Text10.Text = DisallowRun9
End Sub
Private Sub Command1_Click()
On Error Resume Next
Set codetan = CreateObject("WScript.Shell")
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\0", Text1, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\1", Text2, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\2", Text3, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\3", Text4, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\4", Text5, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\5", Text6, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\6", Text7, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\7", Text8, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\8", Text9, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\9", Text10, "REG_SZ"
End Sub
Private Sub Command2_Click()
On Error Resume Next
Set codetan = CreateObject("WScript.Shell")
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\0", Text1, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\1", Text2, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\2", Text3, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\3", Text4, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\4", Text5, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\5", Text6, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\6", Text7, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\7", Text8, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\8", Text9, "REG_SZ"
codetan.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun\9", Text10, "REG_SZ"
End Sub
Aplikasi ini bisa teman download (dalam bentuk exe) di sini.
Selamat mencoba, dan selalu salam codet dari palembang untuk nusantara.
Tidak ada komentar:
Posting Komentar