I am trying to look for a value of a Dword, if it is not true or not present at all then I want to run a reg add cmd. I used some msgbox's for testing as I am new at this. Adding or changing the value is working but I am having trouble tring to read the Value data.
Any suggestions will be appreciated..!!
Any suggestions will be appreciated..!!
Code:
Option Explicit
On Error Resume Next
Dim PvRestore,PvTab
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshShell=CreateObject("WScript.Shell")
PvRestore = "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\NoPreviousVersionsRestore"
WSHShell.RegRead(PvRestore)
If NoPreviousVersionsRestore = 1 Then
Msgbox "True", vbExclamation
Else
Msgbox "False", vbExclamation
End If