Code viết như sau:

Option Explicit
Dim WSHShell, n, MyBox, p, p1, TitleOnlylove, errnum, vers, itemtype
Set WSHShell = WScript.CreateObject("WScript.Shell")

p = "HKCU\Software\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\"
p1 = "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
p = p & "NoControlPanel"
p1 = p1 & "NoControlPanel"
itemtype = "REG_DWORD"
TitleOnlylove = "Mr.Cuong say:"
Err.Clear

On Error Resume Next
n = WSHShell.RegRead (p)
On Error Goto 0
errnum = Err.Number
if errnum <> 0 then
  WSHShell.RegWrite p, 0, itemtype
  WSHShell.RegWrite p1, 0, itemtype
End If
If n = 0 Then
  n = 1
  WSHShell.RegWrite p, n, itemtype
  WSHShell.RegWrite p1, n, itemtype
  Mybox = MsgBox("Control Panel da bi AN, Log Off hoac Restart lai may tinh de thay doi co tac dung!", 4096, TitleOnlylove)
ElseIf n = 1 then
  n = 0
  WSHShell.RegWrite p, n, itemtype
  WSHShell.RegWrite p1, n, itemtype
  Mybox = MsgBox("Control Panel da duoc HIEN LEN, Log Off hoac Restart lai may tinh de thay doi co tac dung!", 4096, TitleOnlylove)
End If


Lưu lại với tên file .vbs :)
\
Hoặc các bạn có thể download đoạn script trên tại đây