Hatless's Note

You can learn with me in there.

Registry edit tools with vbs file

registry ကိုဖြင္႔တမ္း ပိတ္တမ္း ကစားရေအာင္ဗ်ာ…
registry ကို virus ေၾကာင္႔ပိတ္ေနတာပဲျဖစ္ျဖစ္ တစ္ေယာက္ေယာက္က ကလိလုိ႔ပဲျဖစ္ျဖစ္ admin ကပိတ္ထားလုိ႔ပဲျဖစ္ျဖစ္ ဘယ္လုိနည္းနဲ႔ပိတ္ပိတ္ပါ…

ပိတ္ခ်င္လို႔ပဲျဖစ္ျဖစ္ ဖြင္႔ခ်င္လုိ႔ပဲျဖစ္ျဖစ္ vbs ဖုိင္ကို (mouse)double click လုပ္လုိက္တာနဲ႔ ပိတ္ႏုိင္ဖြင္႔ႏုိင္ေအာင္ေရးထားတဲ႔ code ကိုေအာက္မွာေဖၚျပထားပါတယ္…
ဒီ code ေတြကိုကြ်န္ေတာ္ကိုယ္တုိင္ေရးထားတာ… လုိ႔မထင္လုိက္ေလနဲ႔… ဆုိဒ္တစ္ခုက ကူးထားတာဗ်…
အဲဒီကုဒ္ေလးေတြကို notepad မွာ ကူးထည့္လုိက္ျပီး… ဖုိင္နာမည္မွာ ကို္ယ္ေပးခ်င္တာေပးျပီးေတာ႔ ေနာက္က extension ကေတာ႔ “.”(dot) vbs ဖုိင္နဲ႔သိမ္းလုိက္ပါ… ဥပမာ… (homeless.vbs)
အဲဒီ ဖုိင္ေလးကို ကလစ္လုပ္လုိက္တယ္ဆုိရင္… registry ပိတ္ထားရင္ ဖြင္႔ေပးပါလိမ္႔မယ္…
ဖြင္႔ထားတယ္ဆုိရင္ေတာ႔ ပိတ္ေပးပါလိမ္႔မယ္ဗ်ာ… ဒါေပမယ္႔ restart ခ်မွ သက္ေရာက္ပါတယ္…
ဒါေပမယ္႔… ကြ်န္ေတာ္ PC မွာေတာ႔ restart ခ်စရာမလုိပါဖူး… ခ်က္ခ်င္း ပိတ္လုိ႔၊ ဖြင္႔လုိ႔ရပါတယ္…
gtalk ေတြသံုးျပီး registry မွာမက်န္ေစခ်င္သူေတြ အတြက္ဒီဖုိင္က အေထာက္အကူျပဳမွာပါ…

Option Explicit
'Declare variables
Dim WSHShell, n, MyBox, p, t, mustboot, errnum, vers
Dim enab, disab, jobfunc, itemtype
Set WSHShell = WScript.CreateObject("WScript.Shell")
p = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\"
p = p & "DisableRegistryTools"
itemtype = "REG_DWORD"
mustboot = "Log off and back on, or restart your pc to" & vbCR & "effect the changes"
enab = "ENABLED"
disab = "DISABLED"
jobfunc = "Registry Editing Tools are now "
'This section tries to read the registry key value. If not present an
'error is generated. Normal error return should be 0 if value is
'present
t = "Confirmation"
Err.Clear
On Error Resume Next
n = WSHShell.RegRead (p)
On Error Goto 0
errnum = Err.Number
if errnum 0 then
'Create the registry key value for DisableRegistryTools with value 0
WSHShell.RegWrite p, 0, itemtype
End If
'If the key is present, or was created, it is toggled
'Confirmations can be disabled by commenting out
'the two MyBox lines below
If n = 0 Then
n = 1
WSHShell.RegWrite p, n, itemtype
Mybox = MsgBox(jobfunc & disab & vbCR & mustboot, 4096, t)
ElseIf n = 1 then
n = 0
WSHShell.RegWrite p, n, itemtype
Mybox = MsgBox(jobfunc & enab & vbCR & mustboot, 4096, t)
End If

May 7, 2009 - Posted by bhatless | Windows XP | , , , | No Comments Yet

No comments yet.

Leave a comment

You must be logged in to post a comment.