title: Can't use VB Script to create registry keys
body: <p>I can't use VB Script to create registry keys.  I've hecked WMI using wbemtest and I am running the script using administrative privileges.  I beleive the code is correct - I've seen several sample on the internet and it seems to be straight forward.  Is there anything else within the OS that could prevent a VB Script from creating registry keys?  </p>
  
  <p>Sample code is below.</p>
  
  <pre><code>Const HKEY_LOCAL_MACHINE = &amp;H80000002
  
  strComputer = "ostslhqe-48958" 
  
  Set objRegistry = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\default:StdRegProv")
  
  strKeyPath = "SOFTWARE\TestKey"
  
  objRegistry.CreateKey HKEY_CURRENT_USER, strKeyPath
  
  strKeyPath = "SOFTWARE\Script Center"
  
  objRegistry.CreateKey HKEY_CURRENT_USER, strKeyPath
  </code></pre>