title: vbscript and checking for null
body: <p>On the line "If (IsNull(value)) then" below is my code correct? I want to check if the registry key exists and if not then show a web page.</p>
  
  <pre><code>Option Explicit
  On error resume next
  Dim SysVarReg, Value
  Set SysVarReg = WScript.CreateObject("WScript.Shell")
  value = SysVarReg.RegRead ("HKCU\Software\test\FirstLogonComplete")
  
  If (IsNull(value)) then
  
      Set WshShell = WScript.CreateObject("WScript.Shell") 
      WshShell.Run "c:\Program Files\Internet Explorer\iexplore.exe https://intranet/start.htm"
  
      Dim SysVarReg2, Value2
      Value2 = "TRUE"
      Set SysVarReg2 = WScript.CreateObject("WScript.Shell")
      SysVarReg2.RegWrite "HKCU\Software\test\FirstLogonComplete", Value2
  
  else
      wscript.echo "Already logged on"
  end if
  </code></pre>