title: How to create a registry key with VBS?
body: <p>Okay, I will try asking this question again.
  I used this code:</p>
  
  <pre><code>Dim WshShell
  Set WshShell = WScript.CreateObject("WScript.Shell")
  
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\test", 1, "REG_DWORD"
  </code></pre>
  
  <p>I get the error 'Invalid root in registry key' Code: 80070005 (Access Denied)
  The code works with other registry roots. I am logged on as an administrator. It works when I run it from an elevated command prompt. But I am making this VBS as a prank to a friend to make him not know what I'm doing. Any ideas?</p>