a simple vbs question

asad

Member
Apr 28, 2003
56
0
0
hi to all
this is a vbs code adding one value to the registery ... how can we add another value in the same code
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Nodesktop
thanks in advance
the code
Option Explicit
On Error Resume Next

Dim WSHShell, n, p, itemtype, MyBox, vbdefaultbutton
Set WSHShell = WScript.CreateObject("WScript.Shell")

p = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Nofind"
itemtype = "REG_DWORD"


n = WSHShell.RegRead (p)
errnum = Err.Number

if errnum <> 0 then

WSHShell.RegWrite p, 1, itemtype
End If

If n = 0 Then
WshShell.RegWrite p, 1, itemtype
MyBox = MsgBox("&#1578;&#1605; &#1575;&#1582;&#1601;&#1575;&#1569; &#1605;&#1601;&#1578;&#1575;&#1581; &#1575;&#1576;&#1581;&#1579; ", 64, "&#1575;&#1582;&#1601;&#1575;&#1569; &#1575;&#1604;&#1576;&#1581;&#1579;")
End If

If n = 1 Then
WshShell.Regwrite p, 0, itemtype
MyBox = MsgBox("&#1578;&#1605; &#1575;&#1593;&#1575;&#1583;&#1577; &#1605;&#1601;&#1578;&#1575;&#1581; &#1608;&#1610;&#1606;&#1608;&#1586;", 64, "&#1578;&#1605;&#1603;&#1610;&#1606; &#1575;&#1604;&#1576;&#1581;&#1579;")
End If

Set WshShell = Nothing

VisitKelly's Korner

Sub VisitKelly's Korner
If MsgBox("&#1605;&#1593; &#1578;&#1581;&#1610;&#1575;&#1578; &#1575;&#1581;&#1605;&#1583; &#1610;&#1608;&#1587;&#1601;") =6 Then
wshshell.Run "http://www.kellys-korner-xp.com/xp_tweaks.htm"
End If
End Sub